Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

How to do a select form with CityScript?

How to populate a select form with CityScript and have it work.

I copied this from a javacript site that made me feel stupid when I copied into CityDesk to see if it worked. First when I changed from HTML to Normal view. CityDesk trashed it. So, I put it into a variable, and it didn't work.

I hope there is a simple way to do this.  Anyone have a clue?

<form name="jump1">
<select name="myjumpbox"
OnChange="location.href=jump1.myjumpbox.options[selectedIndex].value">
    <option selected>Please Select...
    <option value="http://www.davesite.com/">davesite.com
    <option value="http://www.neonlollipops.com/">neonlollipops.com
    <option value="http://www.about.com/">about.com
</select>
</form>

tk
Sunday, September 19, 2004

If the above script is original there are some ">" missing.

Jorgen B.
Monday, September 20, 2004

You need to close the <option> tags with </option> tags. 

Terry Powell
Monday, September 20, 2004

I'm going crazy

Can anyone link me to some documentation that even tk can understand? I can't find any two that solve the problem tha same way.

It needs to say, "Put this javascript in the head and do a select form like this...".

By they way, the </option> is required in xml but not HTML. That fact isn't helping me much.

tk
Monday, September 20, 2004

Hi tk
I think this is what you are looking for:
http://www.scriptomizers.com/javascript/dropdownmenu_generator

Jorgen B.
Tuesday, September 21, 2004

*  Recent Topics

*  Fog Creek Home