PDA

View Full Version : Drop Down Menu Coding


cookiemonster
06-22-2008, 09:11 PM
Hey, I just made a drop down menu in the web hoster called Freewebs and I entered my code and when I previewed the website, everything was fine, except that when I clicked on one of the drop down menu options, instead of linking me to the website I asked it to link to, it just went to a freewebs page with the same main URL. For example, for one of the drop down menu options I used www.googlemail.com when I clicked on the "Google Mail" text on the drop down menu, it would link me to the freewebs page that says "not found." Please see for yourself by going to the website where the drop down menu is located. I pasted the link below.

I used a "go" button with my drop down menu

The website I used for generating the code for the menu is: http://www.echoecho.com/tooldropdown.htm

The website I used for creating my website is:
www.freewebs.com

The link to the page where the drop down menu is located is:
http://nicksbyman.webs.com/coolwebsites.htm


The code I used for the drop down menu is:

<script>
<!--
function land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
else {if (lowtarget=="_blank") {window.open(loc);}
else {if (lowtarget=="_parent") {parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
//-->
</script>
<form action="dummy" method="post"><select name="choice" size="1"><option value="">Choose a Website</option><option value="www.mozy.com">Mozy</option><option value="www.iFrogz.com">iFrogz</option><option value="www.mazumamobile.com">Mazuma Mobile</option><option value="ww.blog.com">Blog Hosting</option><option value="www.googlemail.com">Google Mail</option><option value="www.kleankanteen.com">Water Bottle Website</option></select><input TYPE="button" VALUE="GO!" onClick="jump(this.form)"></form>







:P Thanks

PappaJohn
06-22-2008, 10:17 PM
In the option values in your dropdown menu, change the url's to include 'http://'.

For example: http://www.googlemail.com instead of www.googlemail.com

cookiemonster
06-23-2008, 11:29 PM
Thannnkkk Youuu

PappaJohn
06-24-2008, 12:39 AM
you're welcome

cyberfriend
06-24-2008, 03:21 AM
:)It is also drop down manu coding helpfull
http://www.htmlcodetutorial.com/linking/linking_famsupp_114.html