|
-
Jan 21st, 2003, 03:26 PM
#1
Thread Starter
Hyperactive Member
Simple listbox question...
How would I take the item selected, which values are .asp's, and execute it when the go button is pressed?
No Multiple attribute.
I think I also have an "onChange" option to use instead of a submit button?
Thanks
<table align="left" width="350">
<tr><td>BETASITES</td>
<td><SELECT NAME="listbox1">
<OPTION VALUE="automated_memgetin.asp">Automated Building Control
<OPTION VALUE="atlantic_memgetin.asp">Atlantic High School
<OPTION VALUE="beta_entrypage.asp">Beta Test Site
</SELECT></td>
<td><FORM><INPUT TYPE="submit" VALUE="GO" NAME="go1"></b></td></tr></FORM>
-
Jan 21st, 2003, 04:36 PM
#2
Frenzied Member
Do you want to be redirected to the selected from drop-down list page or you want to submit form to this page?
-
Jan 22nd, 2003, 08:09 AM
#3
Thread Starter
Hyperactive Member
I want to be redirected on selected or by a go button.
-
Jan 22nd, 2003, 09:57 AM
#4
Addicted Member
<table align="left" width="350">
<tr><td>BETASITES</td>
<td><SELECT NAME="listbox1" onchange="if (listbox1.value!='') window.document.location.href=listbox1.value;">
<option value=""></option>
<OPTION VALUE="automated_memgetin.asp">Automated Building Control </option>
<OPTION VALUE="atlantic_memgetin.asp">Atlantic High School </option>
<OPTION VALUE="beta_entrypage.asp">Beta Test Site </option>
</SELECT></td>
</tr></FORM>
-
Jan 22nd, 2003, 10:12 AM
#5
Thread Starter
Hyperactive Member
Thanks.
I have another 'major' problem so I'll try this out a bit later.
Mikey
-
Jan 22nd, 2003, 02:45 PM
#6
Thread Starter
Hyperactive Member
I'm getting a syntax error on this statement and I can't find an example of it anywhere to compare it to.
Can anybody see it?
<SELECT NAME="listbox1" onchange="if (listbox1.value!=") window.document.locationn.href="listbox1.value;">
<OPTION VALUE=""></OPTION>
<OPTION VALUE="automated_memgetin.asp">Automated Building Control</OPTION>
<OPTION VALUE="atlantic_memgetin.asp">Atlantic High School</OPTION>
<OPTION VALUE="beta_entrypage.asp">Beta Test Site</OPTION>
</SELECT>
Thanks,
Mikey
-
Jan 22nd, 2003, 04:33 PM
#7
Frenzied Member
try this:
Code:
<SELECT NAME="listbox1" onchange="document.location.href=this[selectedIndex].value">
<OPTION VALUE=""></OPTION>
<OPTION VALUE="automated_memgetin.asp">Automated Building Control</OPTION>
<OPTION VALUE="atlantic_memgetin.asp">Atlantic High School</OPTION>
<OPTION VALUE="beta_entrypage.asp">Beta Test Site</OPTION>
</SELECT>
-
Jan 22nd, 2003, 04:46 PM
#8
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|