Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2009
    Location
    glasgow, UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Posts
    495
    Thanks
    0
    Thanked 82 Times in 80 Posts
    Incorrect referencing of form elements.
    Code:
    document.quoteForm.FirstName.value=fName;
    document.quoteForm.addon1.value
    and many others.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •