View Full Version : Trying to add to Drop-down Document Viewer

09-26-2005, 09:36 PM
Wow, maybe if I had realized this forum was here I could have gotten this done sooner...

Drop-down Document Viewer

K... Dont know if you can help because it not a problem with the script directly but something I want it to do. I was trying to get it to where there was another option so the you could type in another page that wasnt listed

I tried to stick in pieces to another code so the beginning so that it looked like this:

<form name="jumpy">

<INPUT TYPE="RADIO" NAME="listed" onclick="no();" CHECKED>Listed

<select name="example" size="1" onChange="gone()">
<option value="http://www.yahoo.com" selected>Yahoo.com</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.lycos.com">Lycos</option>
<option value="http://www.AltaVista.com">AltaVista</option>
<INPUT TYPE="RADIO" NAME="other" onclick="yes();">Other

<DIV ID="MMDiv" style="visibility:hidden">
<LABEL FOR="MakeModel">
<INPUT TYPE="TEXT" name="example" ID="MakeModel">
Or, Enter your own using format http://www.mysite.com</LABEL>

<input type="button" name="test" value="Go!" onClick="gone()">

But I keep getting this error: "'document.jumpy.example.options' is null or not an object" Any one got any ideas? Or maybe you could add another verision of the code that does that :D


09-27-2005, 02:17 AM
The problem is that you have two form elements named 'example'. That is fine for some purposes but, when accessing them via the forms collection using javascript, there can be only one. Otherwise the script cannot know which to choose. Something else wrong but not involved in this problem is that you have other form elements inside of the the select element. It should only contain its options, nothing else.