View Full Version : Cross browser javascript compatibility

01-28-2009, 12:25 AM
I hope this thread fits this forums requirements in that it actually has something to do with scripting the DOM (Document Object Model), or scripting using JSON (JavaScript Object Notation).

Hi there,
Hoping you can help. The page in question is online at...
'www.christophercrawford.110mb.com/purchase.html' and can also be posted if required. It can also be accessed by going to 'www.christophercrawford.110mb.com' then selecting the 'Contact' page and pressing the 'Order Now' button in the top left corner in the left nav bar. It is a test website. Unfortunately I have no computers to sell! And the computer specification information goes nowhere as you have entered it goes no where.

I have discussed this with my lecturer at college and she can find no problem with my code - the javascript part not being part of any assessment but I would love to get it work.

The page consists of XHTML and javascript with an attached CSS layout and a separate 'cookies' javascript file.

When I produced the original javascript and related form xHTML code I wrote them in a separate file. In this separate file the javascript form worked in IE, Firefox and Opera but not Chrome (with exactly the same errors in the latter as shown below).

Once merged into the rest of the HTML and validated as XHTML 1.0 transitional (no changes being made to the javascript) the following occured.

IE - The cookies work giving welcome message and pulling cookies of names and passwords into the relevant boxes, and the form works calculating the quotation and then produces the required alert box. i.e. the form completely works.

Firefox - The cookies work giving the welcome message but the cookies are not pulled through into the relevant boxes. The form works until the quotation options and then the user can go no further.

Chrome - The cookies do not work, no welcome message is shown, boxes with cookies information are not filled, although the rest of the form works fine, calculating the quotation and showing the Thank you message.

Opera - The form completely works. Welcome message is shown, cookies are pulled into required boxes, quotation is calculated and thank you message comes up.

I cannot understand that without changing the javascript in any way that the errors can alter. But even before the merging the form did not work properly in Chrome but worked fine in IE, Firefox and Opera.

I am at a loss with this and would be grateful for any assistance that can be provided by anyone.

Many thanks


01-31-2009, 09:42 PM
Incorrect referencing of form elements.

and many others.