Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-01-14, 04:58 PM   #1
dionysos
Operator! Give me the number for 911!
 
dionysos's Avatar
 
Join Date: Nov 2003
Location: Denmark
Posts: 130
Send a message via ICQ to dionysos
Text Tield code?

I have this Text Tield code. You select an item from the dropdown and click the Submit button, and you are taken to the destination url. But I cant make it work.....

Anyone knows hov it should look, to lets say: go to google on Location 1, and yahoo on Location 2?




<span class="text">Select a location in the list below<br>and click the "Go"
button.</span><br><br>

<SCRIPT LANGUAGE="JavaScript">
<!--function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<select name="selectName" style="font-size:9px;">
<option value="destination_url1.htm">Location 1</option>
<option value="destination_url2.htm">Location 2</option>
<option value="destination_url3.htm">Location 3</option>
</select>

<input type="button" value="Go" onClick="goto_URL(document.dynamiclist.selectName)">
dionysos is offline   Reply With Quote
Old 2004-01-14, 07:19 PM   #2
amadman
I've been mad for fucking years, absolutely years, been over the edge for yonks....
 
amadman's Avatar
 
Join Date: Apr 2003
Location: padded room
Posts: 861
I don't know if this is what you want but here is how I did mine:

Quote:
<FORM name="navform">
<font size="2">Pick One</font>
<SELECT name="navlinks">
<OPTION SELECTED value="http://www.google.com">First Place
<OPTION value="http://www.yahoo.com">Second Place
</SELECT>
<INPUT type="button" name="go" value="Go!" onClick="window.location=document.navform.navlinks.options[document.navform.navlinks.selectedIndex].value"> </FORM>
amadman is offline   Reply With Quote
Old 2004-01-14, 07:48 PM   #3
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
This is the code that I use,

<form>
<select name="menu1" onchange="if(this.options[this.selectedIndex].value!=''){window.open(this.options[this.selectedIndex].value,'_top')}">
<option value="#" selected="selected">Drop Down Menu</option>
<option value="http://www.cleolinks.com">Cleo's Links</option>
</select>
</form>
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2004-01-14, 08:10 PM   #4
dionysos
Operator! Give me the number for 911!
 
dionysos's Avatar
 
Join Date: Nov 2003
Location: Denmark
Posts: 130
Send a message via ICQ to dionysos
Sorry fore posting in the rong forum.

Thank you fore the cods, but I just worked it out.

What im looking fore now is a drop down menu that will show a different pop up on each selection. Ill go ask on a html forum. But if someone just happens to have a code like that.....then give it to me
dionysos is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 05:13 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc