HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Help with Dropdown Menu - Go
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
Promise



Joined: 24 Oct 2004
Posts: 2

PostPosted: Sun Oct 24, 2004 9:08 am     Help with Dropdown Menu - Go Reply with quote

K, I wanna have a dropdown menu at myspace and when people click the 'Go' button next to it, a new window will pop-up and open the URL...but I don't know the exact action I should use...help

here's my code:-
Code:
<FORM
     ACTION="help!!!"
     METHOD=POST ."return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">---Choose A Page---
<OPTION VALUE="www.powertabs.net">My Primary Tabs Source
<OPTION VALUE="www.mxtabs.net">My Secondary Tabs Source
<OPTION VALUE="www.yellowcardrock.com">Yellowcard : Official Site
<OPTION VALUE="www.theused.net">The Used : Official Site
<OPTION VALUE="www.goodcharlotte.com">Good Charlotte : Official Site
<OPTION VALUE="www.azlyrics.com">My Lyrics Source
<OPTION VALUE="www.narutofan.com">Best Naruto Site Ever
<OPTION VALUE="www.suprnova.org>My Torrents Source
<OPTION VALUE="www.punkrockvids.com">Punk Rock Vids Source
<OPTION VALUE="www.urbanchaosvideos.com">Music Video Source
<OPTION VALUE="www.sicknewvideos.tk">Alternate Music Video Source
<OPTION VALUE="www.idobi.com">Best Music Site Ever

</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>
nagasree



Joined: 21 Sep 2004
Posts: 81
Location: Hyderabad, India

PostPosted: Mon Oct 25, 2004 5:24 am     Reply with quote

Try this
Code:

<FORM
     ACTION="help!!!"
     METHOD=POST ."return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">---Choose A Page---</OPTION>
<OPTION VALUE="www.powertabs.net">My Primary Tabs Source</OPTION>
<OPTION VALUE="www.mxtabs.net">My Secondary Tabs Source </OPTION>
<OPTION VALUE="www.yellowcardrock.com">Yellowcard : Official Site </OPTION>
<OPTION VALUE="www.theused.net">The Used : Official Site </OPTION>
<OPTION VALUE="www.goodcharlotte.com">Good Charlotte : Official Site </OPTION>
<OPTION VALUE="www.azlyrics.com">My Lyrics Source </OPTION>
<OPTION VALUE="www.narutofan.com">Best Naruto Site Ever </OPTION>
<OPTION VALUE="www.suprnova.org">My Torrents Source </OPTION>
<OPTION VALUE="www.punkrockvids.com">Punk Rock Vids Source </OPTION>
<OPTION VALUE="www.urbanchaosvideos.com">Music Video Source </OPTION>
<OPTION VALUE="www.sicknewvideos.tk">Alternate Music Video Source </OPTION>
<OPTION VALUE="www.idobi.com">Best Music Site Ever </OPTION>

</SELECT>

<INPUT TYPE=button VALUE="Go" onclick="javascript:OpenPopup(this.form)">
<script language="javascript">
function OpenPopup(frm){
   var url=frm.gourl.options[frm.gourl.selectedIndex].value
   if(url!="")
   {
      var newwindow = window.open("http://"+url);
   }
}
</script>
</FORM>


-Nagasree
Promise



Joined: 24 Oct 2004
Posts: 2

PostPosted: Mon Oct 25, 2004 6:31 am     Reply with quote

it didn't work but thanx anyways
elonpaul



Joined: 01 Oct 2004
Posts: 11
Location: Suomi - Fnnland

PostPosted: Fri Oct 29, 2004 12:54 am     Select menu Reply with quote

Here is my succestion if there is any help...
You can also define the base target as _blank or as _top

<form name="security">
<select name="menu"
onchange="location=document.security.menu.options[document.security.menu.selectedIndex].value;"
value="GO">
<option selected="selected">VIRUSES AND SECURITY</option>
<option value="http://www.mcafee.com">McAfee</option>
<option value="http://cws.internet.com">CWSApps</option>
<option value="http://www.grisoft.com">Grisoft Inc.</option>
<option value="http://www.thefreesite.com/">TheFreeSite.com</option>
<option value="http://www.sophos.com/virusinfo/virusinfo/">Sophos/
Virus info</option>
<option value="http://www.symantec.com/avcenter/">Symantec</option>
<option value="http://www.trendmicro.com">Trend Micro</option>
</select>
</form>
Yahya2004



Joined: 03 Nov 2004
Posts: 3

PostPosted: Wed Nov 03, 2004 6:47 pm     Re: Select menu Reply with quote

hi all,
elonpaul wrote:
Here is my succestion if there is any help...
You can also define the base target as _blank or as _top

<form name="security">
<select name="menu"
onchange="location=document.security.menu.options[document.security.menu.selectedIndex].value;"
value="GO">
<option selected="selected">VIRUSES AND SECURITY</option>
<option value="http://www.mcafee.com">McAfee</option>
<option value="http://cws.internet.com">CWSApps</option>
<option value="http://www.grisoft.com">Grisoft Inc.</option>
<option value="http://www.thefreesite.com/">TheFreeSite.com</option>
<option value="http://www.sophos.com/virusinfo/virusinfo/">Sophos/
Virus info</option>
<option value="http://www.symantec.com/avcenter/">Symantec</option>
<option value="http://www.trendmicro.com">Trend Micro</option>
</select>
</form>

it will be perfect if i hit BACK button in the IE browser at the left-up ,the dropdown menu will auto select the default which is "VIRUSES AND SECURITY" ..

is there a solution? Smile
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial