Results 1 to 2 of 2

Thread: spaces in string passed to function

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    spaces in string passed to function

    I have this popup window, and when you click on the a value in the popup it will call a function passing it the id and the name of the value you selected to send back to the opening window.

    The problem is that the name of the value contains spaces and does not get passed to the function properly and thus errors out.

    function looks like this(I am also using vb.net):

    function sendback(strID, strName) {
    window.opener.parent.frames[1].document.forms.txtID.value = strID;
    window.opener.parent.frames[1].document.forms.txtName.value = strName;
    window.close();
    }

    Now this works, on those that do not have spaces in their name.

    Can anyone give me any suggestions or tell me what I am doing wrong.

    Thanks.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: spaces in string passed to function

    Sorry nevermind. I just did not have quotes around the href calling the function.

    Works now.

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