ASP QUESTION

This topic is 4869 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Guys, i need help, it need something but i dont know how i am going to pull it off. Let's say i have a dbase with 2 tables. Table A and Table B (identical tables just other data, isnt relevant). Let's say i create on my form 2 radio buttons. When i press radio button 1 i want to add to my form a selectionbox(Contents Table 1), when i click the second radio button,same selectionbox, is filled with Contents Table 2. I know how to pull a query aso, but how i am going to create a dynamic selectionbox. I tried the form methode methode, but i dont understand how we are going to know what selectionbox was pressed. If you could help me with this one, thx. Grtz Joran P.S. I have no problem writting C aso but webdesign (asp,php) it gets though my head. Oleee.

Share on other sites
The selection box has to have a value associated with it. here:

<form name="f"><input type="radio" name="rad" value="1">First selection<br><input type="radio" name="rad" value="2">Second selection</br><select name="dropdown">  <option value="1">First selection</option>  <option value="2">First selection</option></select></form>In your ASP code:<%Dim RadioButtonSelectionDim DropDownSelectionRadioButtonSelect = Request("rad")DropDownSelection = Request("dropdown")

Share on other sites
Thx for the help, but i think you didnt understand what i was trying to say.

<form name="f">

<select name="dropdown">
<option value="1">First selection</option>
<option value="2">First selection</option>
</select>
</form>

<%
Dim DropDownSelection

DropDownSelection = Request("dropdown")

Now i know what radiobutton was selected or what dropdown was selected but
in the ASP code itself how can i change the contents of my selectionbox.

I want something like this, and your help is very good but i am still missing something.

//Change the entire contents of the selectionbox dropdown with table 1
else
//Change the entire contents of the selectionbox dropdown with table 2
end if

The commands or let's methodes to change a objects contents of a selectionbox.
I dont know how you do that in asp or vbscript or aso.

But Thx for the help.

Share on other sites
What you'll need to do then is when you write your elements, you'll need to place the "selected" flag within then. I think it's selected for both radio and options. If selected doesn't work then try checked instead.

or maybe

<option value="y" selected>

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 11
• 29
• 15
• 41
• Forum Statistics

• Total Topics
634838
• Total Posts
3019568
×