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

    JavaScript/Windows XP Compatibility Issue?

    For some reason I have a script that works in everything but Windows XP? I have never heard of this before. Any help?

    Basically this is for a pop-up form. When the user submits the form the script empties thier cart (cookies) and refreshes the parent page. This works fine until I test it on a Windows XP machine where the code does not work at all. Has anyone else had XP Javascript Issues?

    <script language="JavaScript">
    <!--
    function refreshParent() {
    window.opener.location.href = "catalog.asp";
    }
    //-->
    </script>
    <script language="JavaScript">
    <!--
    function removeall() {
    var numberofcookies = GetCookie ("number");
    DeleteCookie ("number");
    for (i=1; i < parseInt(parseInt(numberofcookies)+1); i++) {
    DeleteCookie (i);
    }
    }
    //-->
    </script>

    <body onUnload="refreshParent();removeall()" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know what the problem would be, but:
    1. Why do you have a script tag for each function? You can encapsulate all functions in one script tag.
    2. What browser are you testing with? Double check the versions. If you use IE 6 on Windows 2000 and on XP, you should get the same results. Similarly Netscape 7 on either OS should do the same. If you're using the same version browser on different OS's, and you're getting bad results on XP then post back.

    Also, how do you know that it's not working at all? Have you put alert statements inside your functions to see that they're being called?

    Good luck,
    Sadiq.

  • #3
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you

    Thanks for your help, I have already fixed the problem. For some reason I included a line that refreshed the child before it closed , and that was causing it to be submitted twice.


  •  

    Posting Permissions

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