passing + using query string

Results 1 to 2 of 2

Thread: passing + using query string

  1. #1
    Join Date
    Dec 1969

    Default passing + using query string

    i need to pass "+" using query string but when passing into another .asp, it&#039;s gone. The following is the code i wrote :<BR><BR>&#060;input type"text" name="a" onChange="changePage(&#039;other.asp?pQ=a&pAns=&#0 39;+this.value);"&#062;<BR><BR>changePage is a javascript function :<BR><BR>function changePage(ansURL){<BR>parent.bottomFrame.location .href = ansURL ;<BR>}<BR><BR>Any thoughts?

  2. #2
    Join Date
    Dec 1969

    Default RE: passing + using query string

    In a querystring the plus sign equates to a space when it&#039;s decoded. You need to URLEncode your string before you pass it, which you do in Javascript using the escape() function.<BR><BR>&#060;input type"text" name="a" onChange="changePage(&#039;other.asp?pQ=a&pAns=&#0 39;+escape(this.value));"&#062;<BR>

Posting Permissions

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