HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

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 22nd, 2000, 06:52 PM
hbar hbar is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 hbar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am trying to create a drop down menu that directs to a page. When select text from drop down menu, it will automatically direct to a page without have a submit or go button.
Also would this form work on Netscape, Internet Explorer and users with AOL.
Thank you.

Reply With Quote
  #2  
Old October 23rd, 2000, 12:51 AM
mab mab is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 4 mab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This stuff works fine on both browser types (4 and 5).

Make sure that the number of entries in the array equals the number in the select box...


<SCRIPT LANGUAGE='JAVASCRIPT'>
<!--
function doArray() {
var arylnth = doArray.arguments.length;
for ( i = 0; i < arylnth; i++) { this[i]=doArray.arguments[i]}
}

function newpage() {
var choose = eval(document.dropdown.site.selectedIndex);
if ( (choose > 0) && (choose < 100) ) {
var section=new doArray('', '/projects/Content/SuperOptimumPersonal',
'/projects/Content/SuperOptimumCorporate+(Employee)',
'/projects/Content/SuperOptimumCorporate(Employer)',
'/projects/Content/SuperAllocatedAnnuity',
'/projects/Content/Optimum+Private',
'/projects/Content/Optimum+Professional+-+Allocated+Pension',
'/projects/Content/Optimum+Professional+-+Super+Plan',
'/projects/Content/Invest+-+Australian+Share+Portfolio',
'/projects/Content/Invest+-+Australian+Share+Value+Fund',
'/projects/Content/Invest+-+Cash+Portfolio',
'/projects/Content/Invest+-+International+Share+Portfolio',
'/projects/Content/Invest+-+Managed+Portfolio');
location=section[document.dropdown.site.selectedIndex];
}
}
//-->
</SCRIPT><FORM NAME="dropdown">
<SELECT NAME="site" onChange='newpage();' ALIGN="left">
<OPTION SELECTED>Please Select A Product</OPTION>
<OPTION>Optimum Superannuation Personal</OPTION>
<OPTION>Optimum Superannuation Corporate (Employee)</OPTION>
<OPTION>Optimum Superannuation Corporate (Employer)</OPTION>
<OPTION>Optimum Allocated Annuity</OPTION>
<OPTION>Optimum Private</OPTION>
<OPTION>Optimum Professional - Allocated Pension</OPTION>
<OPTION>Optimum Professional - Super Plan</OPTION>
<OPTION>Australian Share Portfolio</OPTION>
<OPTION>Australian Share Value Fund</OPTION>
<OPTION>Cash Portfolio</OPTION>
<OPTION>International Share Portfolio</OPTION>
<OPTION>Managed Portfolio</OPTION>
</SELECT>
</FORM>

mab

Reply With Quote
  #3  
Old October 23rd, 2000, 09:30 AM
hbar hbar is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 hbar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I was told to use this code. I noticed it is different to the one above. Which one is more reliable and works universal.
<form name="form2" >
<SELECT name="guidelinks" onChange="window.location=document.form2.guidelinks.options[document.form2.guidelinks.selectedIndex].value">
<option selected>Price</option>
<option>------------------</option>
<option value="anyprice.htm">Any Price</option>
<option value="pricebracket0-15.htm">$0 - 15</option>
<option value="pricebracket16-25.htm">$16 - 25</option>
<option value="pricebracket0.htm">$26 - 50</option>
<option value="pricebracket51-100.htm">$51 - 100</option>
<option value="pricebracket101-200.htm">$101 - 200</option>
<option value="pricebracket201-500.htm">$201 - 500</option>
</select>
</form>

thanks

Reply With Quote
  #4  
Old October 29th, 2000, 06:35 PM
colin_anderson colin_anderson is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 41 colin_anderson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Both should work equally well. However, the latter would most likely be a better choice do to the fact that it doesn't use JavaScript. So go with the latter. Plus, there's not as much code to use, allowing a smaller file size, which is always a good deal. >=^)

-Colin Anderson
HTML etc. http://www.htmletc.net/

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Drop Down Menu


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway