Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form works in Firefox but not IE - object definition problem??

Status
Not open for further replies.

Scotness

Technical User
Jun 16, 2009
1
Hi - I'm quite a beginner at this and have been writing what to me is a faily complicated form - the key characteristic of the form is that the contents of subsequent drop down boxes varies depending on the user input in the previous one.

The form works fine in Firefox - but not in Internet Explorer 7 or 8 - but it did in 6. It doesn't work in Safari either.

The error code I'm getting from IE8 is:



Message: 'document.free.leveltwo.options' is null or not an object
Line: 277
Char: 1
Code: 0

Message: 'document.free.levelthree.options' is null or not an object
Line: 348
Char: 1
Code: 0

Message: 'document.free.levelfour.options' is null or not an object
Line: 388
Char: 1
Code: 0

Message: 'document.free.levelfive.options' is null or not an object
Line: 429
Char: 1
Code: 0


I think I need to define them as objects first - but I'm unclear how to do this - and have tried with out sucess.

The form is at:

and notes on it's purpose is here (you may need this to understand what I'm trying to do)


Any advice greatly appreciated - and please explain it simply I'm quite an ignoramus at this - and am surprised I've got it to work so far!

Thanks

Scot
 
I get those errors in Firefox as well, and cannot seem to ever get a level 4 box appearing. Perhaps this is due to not knowing what options would ever give a level 4 or 5 box, or perhaps the code is broken worse than you think.

To negate the latter option, and to avoid having to try every combination, how about telling us some options that open up level 4 and 5 boxes?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
One thing to note: Using document.write or document.writeln AFTER the page has loaded will wipe out ALL content that exists on the page so far - including JavaScript.

You might want to look into document.createElement to see how to dynamically create elements, or look into the .innerHTML property of many nodes as it's probably a quicker and easier way if you're not so confident about JS.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top