facing problem asp quiz form - not defined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gururajgd
    New Member
    • Apr 2010
    • 1

    #1

    facing problem asp quiz form - not defined

    i am trying to make a quiz form, below is my code. In this it displayes data correctly but when i click on first option i want that value to be asigned to output textbox but it shows the value in msgbox and gives error not difined :
    Code:
    <form name=frmQz action="MQz.asp" method=post>
    <table height="50%" valign="top"  style="BORDER-COLLAPSE: collapse" bordercolor="#d3d3e2"  align="center" bgcolor="#FFFFFF" cellPadding=0  width="80%" cellSpacing=0 border=1>
    <tr>
    <td width="5%"   colspan=3 bgcolor="#6200F4" height=40 align=middle class="whitebold">Note:Select One Option Out Of 4 Options Provided</td>
    </tr>
    <%if not rQ.eof then%>
    <%n=1%>
    <input type=hidden name=MemID value=<%=MemID%>><%=MemID%></td>
    <input type=hidden name=QuizDate value=<%=rQ("QDate")%>></td>
    <%while not rQ.eof%>
    <tr>
    <td width="5%"  class="text"><%=rQ("srno")%>
    <input type=hidden name=TotQ value=<%=rQ("srno")%>></td>
    <input type=txtsrno name=txtsrno id=txtsrno value="<%=rQ("srno")%>"></td>
    <td width="45%"  class="text"><%=rQ("Question")%></td>
    </tr>
    <%Opt=rQ("Srno")%>
    <%response.write Opt%>
    <tr><td width="5%"  class="text"></td><td class="text"><input type=radio id=<%=n%> name="<%=Opt%>" vlaue="<%=rQ("Opt1")%>" onclick="document.frmQz.output.value=<%=Opt%>"><%=rQ("Opt1")%> </td></tr>
    
    <tr><td><input type=textbox name=srno id=srno value=<%=rQ("srno")%>></td>
    
    <tr><td width="5%"  class="text"></td><td class="text"><input type=radio id=<%=n%> name="<%=Opt%>" vlaue="<%=rQ("Opt1")%>" onclick="document.frmQz.output.value=<%=Opt%>"><%=rQ("Opt2")%> </td></tr>
    <tr><td><input type=textbox name=srno id=srno value=<%=rQ("srno")%>></td>
    
    <tr><td width="5%"  class="text"></td><td class="text"><input type=radio id=<%=n%> name="<%=Opt%>" vlaue="<%=rQ("Opt1")%>" onclick="document.frmQz.output.value=<%=Opt%>"><%=rQ("Opt3")%></td></tr>
    <tr><td><input type=textbox name=srno id=srno value=<%=rQ("srno")%>></td>
    
    <tr><td width="5%"  class="text"></td><td class="text"><input type=radio id=<%=n%> name="<%=Opt%>" vlaue="<%=rQ("Opt1")%>" onclick="document.frmQz.output.value=<%=Opt%>"><%=rQ("Opt4")%></td></tr>
    
    <tr><td><input type=textbox name=srno id=srno value=<%=rQ("srno")%>></td>
    <td><input type=textbox name=txtans id=txtans value="<%=rQ("answer")%>"></td>
    <td><input type=textbox name=output id=output></td>
    <%	
    n=n+1
    rQ.movenext
    wend
    rQ.close
    set rQ=nothing
    %>
    <%end if%>
    <tr>
    <td colspan=3 bgcolor="#FFFFFF" align=center class="whitebold"><input type=submit value="submit"></td>
    </tr>
    </table>
    </form>
    pls help thanks in advance.
    Last edited by jhardman; Apr 10 '10, 06:37 PM. Reason: added code tags. please use code tags in the future
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    I'm afraid the issue is in the javascript. I will move this to the javascript forum for you.

    Jared

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      I would need to the the JavaScript portion to tell something off it.

      Comment

      Working...