Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-27-2009, 11:25 PM   PM User | #1
cdbc81
New to the CF scene

 
Join Date: Jan 2009
Location: glasgow, UK
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
cdbc81 is an unknown quantity at this point
Cross browser javascript compatibility

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

Christopher
cdbc81 is offline   Reply With Quote
Old 01-31-2009, 08:42 PM   PM User | #2
Fang
Regular Coder

 
Join Date: Jun 2004
Posts: 495
Thanks: 0
Thanked 82 Times in 80 Posts
Fang is on a distinguished road
Incorrect referencing of form elements.
Code:
document.quoteForm.FirstName.value=fName;
document.quoteForm.addon1.value
and many others.
Fang is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:06 AM.


Advertisement
Log in to turn off these ads.