...

View Full Version : Handling spaces in parameter names



florida
06-25-2004, 07:53 PM
I have a pop up menu that shows web links.
It works great but if the URL in the pop up menu has a blank space in it then the URL doesnt work.
This only happens in my IE6 but works great in Netscape 4.77.


How do you put spaces in the URL for JavaScript parameters?
Here are some attempts but that didnt work:


http://myurlhere/data here/file name.doc
http://myurlhere/data%20here/file%20name.doc
http://myurlhere/data\shere/file\sname.doc


Anything else I can try?

Willy Duitt
06-25-2004, 08:53 PM
I have a pop up menu that shows web links.
It works great but if the URL in the pop up menu has a blank space in it then the URL doesnt work.
This only happens in my IE6 but works great in Netscape 4.77.


How do you put spaces in the URL for JavaScript parameters?
Here are some attempts but that didnt work:


http://myurlhere/data here/file name.doc
http://myurlhere/data%20here/file%20name.doc
http://myurlhere/data\shere/file\sname.doc


Anything else I can try?

There is no reason why %20 would not work and there is a good possibility that you would not even need to convert the space to %20 within your script. But, we would need to see your script, not your psuedo links....

Besides, you would think that you would have learned back in december (http://www.codingforums.com/showthread.php?t=30005&highlight=spaces+file) that these spaces invariably cause problems and that it is a bad practice to use this naming convention.

Anyways, post your script and I'm sure someone could spot the problem.

florida
06-28-2004, 01:59 PM
Thanks for your post and I am using spaces provided from other people's files.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum