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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MAC OS form value substitution failures

    Hi

    What a great forum and resource. I have an annoying problem I hope you can help with.

    A form validator, which executes fine in Windows across Firefox, IE, Netscape 7.2, Netscape 8.0, Opera, etc, fails on MACs with both Safari and IE.

    Two form substitutions are not working. The most simple is...

    function makeName()
    {
    document.Checkout.name.value = document.Checkout.forename.value + ' ' + document.Checkout.surname.value;
    }

    This function is called from within another using ' makeName() '

    The parent function is called by ...

    <FORM class="nospace" name="Checkout" METHOD="POST" ACTION="https:domain/script.cgi" onSubmit="return checkIt(Checkout);">


    The value of document.Checkout.name.value comes back blank through the CGI script, but only with MACs.

    I have read through the FAQs, done various searches and spent hours trawling the web looking for answers. Without access to a MAC this problem is very difficult to solve and highly frustrating. Please help a poor old fool.

    Thanks

    Steve

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Change this line:
    Code:
    <FORM class="nospace" name="Checkout" METHOD="POST" ACTION="https:domain/script.cgi" onSubmit="return checkIt(Checkout);">
    To this:
    Code:
    <FORM class="nospace" name="Checkout" METHOD="POST" ACTION="https:domain/script.cgi" onSubmit="return checkIt(this);">
    Hope this helps

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Cheers Martin

    I was reading somewhere also that there is a problem with the onClick event handler in Mac OS / Safari. Know anything about that?

    I have the events set at the moment so that things should change as people click (the radio buttons), but run the substitution again during the onsubmit call of a separate check-all function to ensure it has definitely happened.

    Also, this works on most browsers on Windows XP, but is it restricting compatibility....?

    var zone = new Array()
    zone["X"]="A";
    zone["GB"]="A";
    zone["IT"]="B";
    zone["CH"]="B";
    zone["AL"]="B";
    zone["LU"]="B";

    var free = new Array()
    free["A"]="0";
    free["B"]="100";
    free["C"]="200";
    free["D"]="500";

    var curzone = zone[v];

    var curfree = eval(free[curzone] - 0);


    where zone X, GB etc are pulled from the value of a select box.

    All help very gratefully apreciated...

    Cheers,

    Steve

  • #4
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    Bump!

    Help!


  •  

    Posting Permissions

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