Thank you very much Nick, it'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> <<a href="mailto:nick@nickfitz.co.uk">nick@nickfitz.co.uk</a>> 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>> I have a peculiar problem in my application. I have a query string
<br>> in javascript which I have to pass the Team Name to the next page.<br>> Everything is working fine, but suddenly there is a problem occurs<br>> now. That is, if there is any ampersand character in the team name,
<br>> it is not taking the characters after that.<br>><br>> For eg: the team name can be Printing & Stationery. So the query<br>> string will take upto Printing and avoid after that. How to add<br>> 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><<a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt
</a>>.<br><br>To correctly encode your query string data, use the<br>encodeURIComponent function:<br><br>var queryComponent = "Printing & Stationery";<br>alert(encodeURIComponent(queryComponent)); // shows "Printing%20%26%
<br>20Stationery"<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>