Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Handling spaces in parameter names

    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?

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by florida
    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 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.

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your post and I am using spaces provided from other people's files.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •