XP SP2 breaks body onload or location.href?

C

crwng

Hi. I'm trying to forward my web site users to a more friendly error
message whenever they encounter a 404 page not found error.


So far, it's been working fine...until XP SP2 came onto the scene.
I've so far refused to update to SP2 so I've been unaware of the issue
until someone just pointed it out to me.


The simple code below fails to forward to the URL I'm passing to it on
XP SP2 machines in IE. Did SP2 disable the ability to use <body
onload= or to use location.href?

<html>
<head>


<cfparam name="variables.baseURL" default="http://www.mycompany.com">


<script language="javascript1.2">
function forward(url){
var baseURL = '<cfoutput>#variables.baseURL#­</cfoutput>'
location.href=baseURL+'/suppor­t/supportform.cfm?referrer=' +
escape(url);


}


</script>
</head>
<body onload="forward(document.locat­ion.href)"></body>
</html>
 
R

Robert

The simple code below fails to forward to the URL I'm passing to it on
XP SP2 machines in IE. Did SP2 disable the ability to use <body
onload= or to use location.href?

After SP2 IE usually asks the user to allow javascript when the page
contains javascript that modifies the location (and probably in other
circumstances). So if the user does not allow it, the script is disabled.

BTW a lot of that forward function is not javascript.
I never used coldfusion, but I expect that's what it is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top