Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In IE6 when url contains space script gives access denied error

Status
Not open for further replies.

theunknown

Programmer
Apr 24, 2003
2
PT
Hello Friends
The following function gives error when the url contsins space charcter (%25), other wise it works fine.

function OpenWindow(){
var l=open('','D',"titlebar=no,height=130,width=290');
l.document.write('<HTML><BODY>Hello World</BODY></HTML>);
l.document.close();
l.focus();
}
thanks in advance.
TheUnknown.
 
This shows that it's not wise to use spaces (among other non-alphanumeric characters) in file names. To get around the problem, use:

var safeURL=escape(unsafeURL);

This doesn't make it any wiser, and some browsers choke on converting the &quot;safe&quot; URL back to the original poorly named one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top