DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ASP (http://www.daniweb.com/forums/forum62.html)
-   -   radio button ASP question?? (http://www.daniweb.com/forums/thread30035.html)

djbsabkcb Aug 8th, 2005 2:49 am
radio button ASP question??
 
Below is my source code for a questionnaire I created using HTML and ASP. It contains radio buttons for the selections. I coded it using ASP and HTML. However, when I click the submit button the selections made by user are not displayed on the screen. What am I missing?



HTML code::

<html>
<h1><STRONG><var>eLMS </var>Helpdesk</STRONG></h1>
<form>
<!--<td><STRONG>Dear<%=cookie.username%></STRONG><br>-->
<td><STRONG>You recently sent an email to the <var>eLMS </var>Helpdesk regarding a concern or problem you experienced with the new <var>eLMS</var> ( Learning Management System ).  Please complete this Customer Satisfaction Survey concerning the service you were provided.</STRONG><br>
</td></tr></form>
<!--<form method="post" action="processform.asp">  -->
<form method="post" action="C:\Documents and Settings\Administrator.ARC00WN82534000\Desktop\eLMS FORM1\eLMS feedback form\eLMS_feedback_form_process.html">
<table border="1" bgcolor="#98AFC7">
<tr>
<td align="center">
<br>    <br>
<blockquote>
<!--First Name: <input type="text" size="25" name="f1"><br>
Last Name: <input type="text" size="25" name="f2"><br>-->

<br>
<DIV align="center "><TABLE>
<br>
<STRONG>What was your reason for contacting the <var>eLMS</var> Help Desk?
 </STRONG>
<br>




<input type="radio" name = "reason" value = "0"> Unable to login to eLMS<br>
<input type="radio" name = "reason" value = "1">Unable to connect to eMLS login page<br>
<input type="radio" name = "reason" value = "2">Password reset request<br>
<input type="radio" name = "reason" value = "3">Unable to launch course<br>
<input type="radio" name = "reason" value = "4">Course progress is not being saved<br>
<input type="radio" name = "reason" value = "5">Unable to print report or completion certificate<br>
<input type="radio" name = "reason" value = "6">Received e-mail message concerning Learning Expiration Notification<br>
<input type="radio" name = "reason" value = "7">Other<br>


<br>
<STRONG>How long did it take to get a response to your e-mail?</STRONG><br>



<input type="radio" name = "response" value = "0">Under 1 hour<br>
<input type="radio" name = "response" value = "1">2 - 6 hours<br>
<input type="radio" name = "response" value = "2">6 - 12 hours<br>
<input type="radio" name = "response" value = "3">1 business day<br>
<input type="radio" name = "response" value = "4">More than 1 business day<br>
<input type="radio" name = "response" value = "5">They did not reply to my e-mail<br>




<br>
<STRONG>Was your problem or issue resolved?</STRONG><br>



<input type="radio" name = "resolved" value = "0">Yes<br>
<input type="radio" name = "resolved" value = "1">No<br>






<br>
<STRONG>Overall, how would you rate your customer service experience?</STRONG><br>



<input type="radio" name = "rate" value = "0">Very Satisfied<br>
<input type="radio" name = "rate" value = "1">Satisfied<br>
<input type="radio" name = "rate" value = "2">Neutral<br>
<input type="radio" name = "rate" value = "3">Unsatisfied<br>
<input type="radio" name = "rate" value = "4">Extremely unsatisfied<br>

</TABLE>


</DIV>

<br><STRONG>Do you have any comments or suggestions that would help us improve our eLMS customer service?  </STRONG>

<textarea name="comments" rows="5" cols="50">
</textarea><br><br>


<input type="submit" value="SUBMIT" name="action">
<input type="reset" value="RESET">
<!--<a href="C:\Documents and Settings\Administrator.ARC00WN82534000\Desktop\FAA eLMS feedback formradio.html">Feedback</a></font></p> -->
</blockquote>
<br>
end of HTML code.






ASP code::


<html>
<head>

<title>
  eLMS Feedback Form Process
</title>



<body bgcolor = "white">

<h1>
FORM OUTPUT
</h1>

<blockquote>

        <b>  Reason for contacting:</b> <%=Request.Form("reason")%> <br><br>

                <blockquote>
                        <%
                                theCount = Request.Form.Count
                                        For i = 0 to theCount
                                                Response.Write("<b>"& i & " - " & Request.Form(i) & "</b><br>")
                                        Next
                        %>
                </blockquote>

        <b>  Response Time:</b> <%=Request.Form("response")%> <br><br>

                <blockquote>
                        <%
                                theCount = Request.Form.Count
                                        For i = 0 to theCount
                                                Response.Write("<b>"& i & " - " & Request.Form(i) & "</b><br>")
                                        Next
                        %>
                </blockquote>

        <b>  Issue Resolved:</b> <%=Request.Form("resolved")%> <br><br>

                <blockquote>
                        <%
                                theCount = Request.Form.Count
                                        For i = 0 to theCount
                                                Response.Write("<b>"& i & " - " & Request.Form(i) & "</b><br>")
                                        Next
                        %>
                </blockquote>


        <b>  Rate Service:</b> <%=Request.Form("rate")%> <br><br>

                <blockquote>
                        <%
                                theCount = Request.Form.Count
                                        For i = 0 to theCount
                                                Response.Write("<b>"& i & " - " & Request.Form(i) & "</b><br>")
                                        Next
                        %>
                </blockquote>

       

        <b>  Comments: </b>  <%=Request.Form("comments")%> <br><br><br>

</blockquote>


<hr>


</html>

</head>

end of ASP code::

madmital Aug 11th, 2005 4:31 am
Re: radio button ASP question??
 
You wanna use this form action
<!--<form method="post" action="processform.asp">  -->

instead of this
<form method="post" action="C:\Documents and Settings\Administrator.ARC00WN82534000\Desktop\eLMS FORM1\eLMS feedback form\eLMS_feedback_form_process.html">

I'm not sure excatly what you're trying to do, but if you want to loop through the radio buttons it should be like this:
theCount = Request.Form.Count
For i = 1 to theCount-1
Response.Write("<b>"& i & " - " & Request.Form(i) & "</b><br>")
Next



But itsn't want you're trying to do really smth like:
html code:

<input type="radio" name = "reason" value = "unable"> Unable to login to eLMS<br>
<input type="radio" name = "reason" value = "Unable to connect to eMLS login page">Unable to connect to eMLS login page<br>
<input type="radio" name = "reason" value = "Password reset request">Password reset request<br>
<input type="radio" name = "reason" value = "Unable to launch course">Unable to launch course<br>
<input type="radio" name = "reason" value = "Course progress is not being saved">Course progress is not being saved<br>
<input type="radio" name = "reason" value = "Unable to print report or completion certificate">Unable to print report or completion certificate<br>
<input type="radio" name = "reason" value = "Received e-mail message concerning Learning Expiration Notification">Received e-mail message concerning Learning Expiration Notification<br>
<input type="radio" name = "reason" value = "Other">Other<br>


"....and so on"

asp code:
<b>  Reason for contacting:</b> <%=Request.Form("reason")%> <br><br>
<b>  Response Time:</b> <%=Request.Form("response")%> <br><br>
<b>  Issue Resolved:</b> <%=Request.Form("resolved")%> <br><br>

"....and so on"

djbsabkcb Aug 11th, 2005 12:59 pm
Re: radio button ASP question??
 
I tried that but it still does not display the infomation selected by the user(s). I also switched it to processform.asp but still same results, No display.

madmital Aug 11th, 2005 2:47 pm
Re: radio button ASP question??
 
1 Attachment(s)
OK...check out the attached file.

I've edited it to do what I think you need it to do (?).
It works for me on IIS.

djbsabkcb Aug 12th, 2005 2:56 pm
Re: radio button ASP question??
 
I will try it and let you know what happens.

Thanks

djbsabkcb Aug 14th, 2005 3:05 pm
Re: radio button ASP question??
 
So Madmittal,

When you click Submit button does the next page display the radio buttons statements that were selected and the comments that were keyed in.

madmital Aug 15th, 2005 3:00 am
Re: radio button ASP question??
 
Yes.

Something like:

Quote:

FORM OUTPUT
Reason for contacting: Unable to launch course

Response Time: 1 business day

Issue Resolved: Yes

Rate Service: Unsatisfied

Comments: blah

You get smth else?

djbsabkcb Aug 15th, 2005 9:30 am
Re: radio button ASP question??
 
Yes I am only getting the header display. No radio value buttons displayed. I am going to check and make sure my computer is running on IIS but I thought I followed the directions pretty well. Exactly what are those single quote parenthesis ( ' )on the left side of the code for?

madmital Aug 15th, 2005 11:15 am
Re: radio button ASP question??
 
Good idea...if you don't get an output like above smth is wrong.

The (') in front of a line means that the line is not executed. It's the equivilant of (//) in JavaScript....

djbsabkcb Aug 15th, 2005 5:00 pm
Re: radio button ASP question??
 
Well someone stated that it must run on a server. I thought I setup my desktop with IIS configurations. The steps I used to install IIS are as follows:

1. Open control panel
2. Go to add/remove programs then go to add window components
3. Highlight Internet Information Services
4. Click details then check every box in window.
5. Click next then follow instructions and insert disk of Windows XP when asked.

Is this correct or am I missing something?


All times are GMT -4. The time now is 11:44 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC