Results 1 to 3 of 3

Thread: VBScript passing string params from HTML

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    VBScript passing string params from HTML

    I have a client side vbscript function which accepts 2 parameters.
    I call this function from HTML from an Href. Everything works fine until i send a parameter where one of the strings has a space in it. I get an error on the page. The string needs to be quoted, when i put single quotes it wont work and when i put double quotes the HTML thinks its ending the string.
    ANY IDEAS???

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Code:
    navigateurl = "myvbscriptfunction('my string')"
    Do you mean like this?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232
    THat is exactly what the problem was. I figured it out. What I had to do was put the outer quotes as single quotes and the function call double quotes...
    <a href='somefunction("params")'></a>
    that worked.
    I guess html allows single and vbscript only allows double quotes.
    Thanks for your help

Posting Permissions

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



Click Here to Expand Forum to Full Width