JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 10th, 2001, 12:57 AM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
form/javascript problem

I have this piece of code which works fine in IE, but not in NS (suprise suprise)
What it is supposed to do is once you choose an option from the select box it should direct you to another page at the <a name> reference.

Netscape takes you only to the top of the page.

here is the code:

<FORM action="index.html" method="get" name="form1">
<SELECT name=menu1 language=javascript
onChange="document.form1.action=this.options[this.selectedIndex].value;document.form1.submit();">
<option value="h.html#_section1">Introduction</option>
<option value="h.html#_section2">Personal Details</option>
<option value="h.html#_section3">Change of Details</option>
<option value="h.html#_section4">Induction Arrangements</option>
</select>
</form>

Thank you
wabirdman
__________________
Real programmers code in binary

Reply With Quote
  #2  
Old October 11th, 2001, 09:13 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
Not a great idea, using a form submission for a re-direct like this. Try:

<form>
<select onchange="window.location=this[this.selectedIndex].value">

Interesting:<SELECT ..... language=javascript >

Reply With Quote
  #3  
Old October 11th, 2001, 09:16 PM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
Thanks - I did end up working it out

I used this

onChange="location.href=this.options[this.selectedIndex].value"

cheers
wabirdman

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > form/javascript problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap