JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old March 27th, 2006, 11:38 AM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
Javascript/html form menu I.E. compatibility problem

Hi, I have been working on some javascript/html form code in order to produce a four tier drop-down menu that uses data from the previous menu to display the contents of the second and so on. It has been working fine on both browsers that I have, namely I.E. ver 5.3 and Safari (yes I have a Mac!) until I cut and pasted an extra chuck of data that I thought would not affect anything and it suddenly decided that it would not work. So I quickly stepped back my actions and re-ftp'd the page and now it will not work in ver 5.2 of I.E. or any other for PC ie ver 6, only works in Safari, Netscape and FireFox for Mac, in FireFox for PC it re-freshes the page each time a selection is made. It is driving me nuts because I don't know how to tackle a problem like this when I've gone back to the original state and now these's a browser problem.
Most of the tiers use this code:-
Code:
var OtherArray = ............etc etc
.
.
.

var PlymouthArray =  new Array("('Select School type','',true,true)",
"('Plymouth Pre-School groups')",
"('Plymouth Nursery Schools')",
"('Plymouth Primary Schools')",
"('Plymouth Secondary Schools')");
function populateType(inForm,selected) {
var selectedArray = eval(selected + "Array");
while (selectedArray.length < inForm.school.options.length) {
inForm.school.options[(inForm.school.options.length - 1)] = null;
}
for (var i=0; i < selectedArray.length; i++) {
eval("inForm.school.options[i]=" + "new Option" + selectedArray[i]);
}
if (inForm.borough.options[0].value == '') {
inForm.borough.options[0]= null;
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0);
}
else {   	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') {
window.history.go(0);
            }
         }
      }
   }
}

Further down we have that section of the menu.
Code:
<select name="school" onChange="populateSchool(document.form1,document.form1.schoo  l.options[document.form1.school.selectedIndex].text)">
<option value=''>Select School</option>
</select>


If anyone could tell me what approach I should take to resolve this browser problem I would be very grateful. Cheers.

Reply With Quote
  #2  
Old April 5th, 2006, 11:21 AM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
I sorted it myself.

I had text at the end of this line of the form:
<select name="school" onChange="populateSchool(document.form1,document.form1.schoo l.options[document.form1.school.selectedIndex].text)">

As it was being populated by data from another source it should have been value not text

It now works, not really a IE compatiblity problem after all!
Comments on this post
MadCowDzz agrees: Thanks for the followup!

Reply With Quote
  #3  
Old April 6th, 2006, 07:50 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
IE takes the blame for a lot of things =)
thanks for the followup!
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Javascript/html form menu I.E. compatibility problem


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 | 
  
 

Iron Speed




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