Thank you very much Nick, it&#39;s working in the desired manner. Thanks a lot!!!<br><br>
<div><span class="gmail_quote">On 4/4/07, <b class="gmail_sendername">Nick Fitzsimons</b> &lt;<a href="mailto:nick@nickfitz.co.uk">nick@nickfitz.co.uk</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On 4 Apr 2007, at 12:14:58, Rajaram Sahasranaman wrote:<br><br>&gt; I have a peculiar problem in my application. I have a query string
<br>&gt; in javascript which I have to pass the Team Name to the next page.<br>&gt; Everything is working fine, but suddenly there is a problem occurs<br>&gt; now. That is, if there is any ampersand character in the team name,
<br>&gt; it is not taking the characters after that.<br>&gt;<br>&gt; For eg: the team name can be Printing &amp; Stationery. So the query<br>&gt; string will take upto Printing and avoid after that. How to add<br>&gt; these special character along with he query string in javascript?
<br><br>The ampersand is one of a number of reserved characters within the<br>query component of a URI, as described in section 3.4 of RFC 2396<br>&lt;<a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt
</a>&gt;.<br><br>To correctly encode your query string data, use the<br>encodeURIComponent function:<br><br>var queryComponent = &quot;Printing &amp; Stationery&quot;;<br>alert(encodeURIComponent(queryComponent)); // shows &quot;Printing%20%26%
<br>20Stationery&quot;<br><br>Regards,<br><br>Nick.<br>--<br>Nick Fitzsimons<br><a href="http://www.nickfitz.co.uk/">http://www.nickfitz.co.uk/</a><br><br><br><br>_______________________________________________<br>Javascript mailing list
<br><a href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</a><br><a href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</a><br></blockquote></div><br>