Jump to content

window.location to htaccess protected URL???


neilhillman

Recommended Posts

I came across something curious, and I can't find any documentation on it...

 

When you use "window.location.href" to forward a page using Javascript, like so:

 

<script language="JavaScript">
<!--
window.location.href = "http://www.picshost.net/secure/";
// -->
</script>

 

... this works fine, but if you try redirecting to an .htaccess password protected page, like so:

 

<script language="JavaScript">
<!--
window.location.href = "http://username:[email protected]/secure/";
// -->
</script>

 

... this will work in FF, but not in IE!

 

IE returns the Error Message: A security problem occurred.

Anyone know any workarounds?

 

Thanks!

 

Neil

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.