Jump to content

PLEASE HELP ME WITH MY DROP DOWN LIST!


juillet
 Share

Recommended Posts

I really need help making a Drop Down List, in the list there are celebs names, and when you click the name you wanna see a picture of the celeb will show up on top in the same browser . here is what i have. Can u guys help me by telling how to make it work on blogger? do i need to use url links? is it possible for the image to go top of menu and also stay no the page. thank guys for your help.

 <script language="javascript" type="text/javascript">function jump(form) {var myindex=form.menu.selectedIndexif (form.menu.options[myindex].value != "0"){window.open(form.menu.options[myindex].value,target="celebs");}}//--></script><form name="celebs" method="post" enctype="multipart/form-data"><select name="celebs" style="width: 200px; height: 20px;color: #ffffff; font-size: 11px; font-family: Arial;background-color: #404040;"onchange="showpic(this.options[this.selectedIndex].value)"><option>Enter Text Here</option><option>Enter Text Here</option><option>Enter Text Here</option><option>Enter Text Here</option><option>Enter Text Here</option></select>

is there something wrong with this code???

Link to comment
Share on other sites

I'm fairly new to JavaScript myself but I'll take a stab at this... From the looks of it, for the onchange for the select element, you have 'showpic()', where your function is actually called 'jump()'.Also, if you're looking to pass the whole form to the function showpic(), you do it like this: onchange="showpic(this.form);"What else I noticed is this: var myindex=form.menu.selectedIndexInstead should be: var myindex=form.celebs.selectedIndex; because for the select element's name attribute, you have 'celebs'.For the if statement, should look something like this instead, basically switching 'menu' to 'celebs':

	if (form.celebs.options[myindex].value != 0)	{	window.open(form.celebs.options[myindex].value, target="celebs");	}

Perhaps some of the other JavaScript guys can chime in but those are the things I've noticed. Good luck.

I really need help making a Drop Down List, in the list there are celebs names, and when you click the name you wanna see a picture of the celeb will show up on top in the same browser . here is what i have. Can u guys help me by telling how to make it work on blogger? do i need to use url links? is it possible for the image to go top of menu and also stay no the page. thank guys for your help.
 <script language="javascript" type="text/javascript">function jump(form) {var myindex=form.menu.selectedIndexif (form.menu.options[myindex].value != "0"){window.open(form.menu.options[myindex].value,target="celebs");}}//--></script><form name="celebs" method="post" enctype="multipart/form-data"><select name="celebs" style="width: 200px; height: 20px;color: #ffffff; font-size: 11px; font-family: Arial;background-color: #404040;"onchange="showpic(this.options[this.selectedIndex].value)"><option>Enter Text Here</option><option>Enter Text Here</option><option>Enter Text Here</option><option>Enter Text Here</option><option>Enter Text Here</option></select>

is there something wrong with this code???

Edited by Don E
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...