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 04-07-2004, 05:04 PM   PM User | #1
gwsoccer14
New to the CF scene

 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
gwsoccer14 is an unknown quantity at this point
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">
gwsoccer14 is offline   Reply With Quote
Old 04-13-2004, 09:11 PM   PM User | #2
sad69
Senior Coder

 
Join Date: Feb 2004
Posts: 1,206
Thanks: 0
Thanked 0 Times in 0 Posts
sad69 is an unknown quantity at this point
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.
sad69 is offline   Reply With Quote
Old 04-13-2004, 09:48 PM   PM User | #3
gwsoccer14
New to the CF scene

 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
gwsoccer14 is an unknown quantity at this point
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.
gwsoccer14 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 01:48 PM.


Advertisement
Log in to turn off these ads.