Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 12-31-2010, 05:55 AM Radio button form
Novice Talker

Posts: 9
Name: Kenny
Trades: 0
I never realized things would be so difficult. What im trying to do is make a radio button page where ppl can make their selection and then have the results sent to me via whatever method is best. From what i have seen that would be asp. So with that said i went to w3schools website and i see how it would work but what it fails to tell me is the steps it takes to make it happen. What it shows me is this.

Code:
<html>
<%
dim cars
cars=Request.Form("cars")
%>
<body>
<form action="demo_radiob.asp" method="post">
<p>Please select your favorite car:</p>

<input type="radio" name="cars"
<%if cars="Volvo" then Response.Write("checked")%>
value="Volvo">Volvo</input>
<br />
<input type="radio" name="cars"
<%if cars="Saab" then Response.Write("checked")%>
value="Saab">Saab</input>
<br />
<input type="radio" name="cars"
<%if cars="BMW" then Response.Write("checked")%>
value="BMW">BMW</input>
<br /><br />
<input type="submit" value="Submit" />
</form>
<%
if cars<>"" then
   Response.Write("<p>Your favorite car is: " & cars & "</p>")
end if
%>
</body>
</html>

Now do i take this code and put it into a regular html file and then make an asp page to go on my server. How do i see the resuts ? So lost and confused here. Please help me with this. Ugggh

Last edited by chrishirst; 12-31-2010 at 03:15 PM..
DarkLogan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-31-2010, 11:43 AM Re: Radio button form
phazorRise's Avatar
Skilled Talker

Posts: 57
Name: Sachin Gutte
Trades: 0
You are submitting the form to itself. So first , cars will be empty. So no radiobox will be checked and no line will be displayed below the form.
and after submitting form by selecting radio button, that perticular box will be checked and at end it will print last line with 'cars' value.

Last edited by phazorRise; 12-31-2010 at 12:17 PM..
phazorRise is offline
Reply With Quote
View Public Profile
 
Old 12-31-2010, 03:24 PM Re: Radio button form
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,336
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
From what i have seen that would be asp.
Only if your hosting supports ASP.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-02-2011, 02:03 PM Re: Radio button form
Novice Talker

Posts: 9
Name: Kenny
Trades: 0
Ok i saved it as .aspx I need help with seeing the results. What am i missing here ??

<form action="test.asp" method="post">
<p>Please select your favorite car:</p>
<input type="radio" name="cars"
value="Volvo">Volvo</input>
<br />
<input type="radio" name="cars"
value="Saab">Saab</input>
<br />
<input type="radio" name="cars"
value="BMW">BMW</input>
<br /><br />
<input type="submit" value="Submit" />
</form>

Last edited by DarkLogan; 01-05-2011 at 06:17 AM.. Reason: Update
DarkLogan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Radio button form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37937 seconds with 12 queries