Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2003, 12:49 PM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ampersand in a Query string

Hi
I am trying to pass a variable with amersand in it - through a query string. It is not recognising the the characters after ampersand as part of same variable. How to solve this problem?
Example:

Mfr = "A&D Engineering";
document.frmRequestItems.action="RequestItems.asp? Mfr=" + Mfr;
document.frmRequestItems.submit();

 
Old November 3rd, 2003, 12:57 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I think it should be %26, use encodeURIComponent in JScript on IE or escape if you need cross browser.



--

Joe
 
Old November 3rd, 2003, 01:07 PM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you. %26 works Great

Thanks a lot
Nalini






Similar Threads
Thread Thread Starter Forum Replies Last Post
Ampersand SQL equivalent Coby Access VBA 1 May 4th, 2007 06:25 AM
ampersand in hyperlink is not working bcogney XML 5 August 23rd, 2006 04:27 PM
Escaping Ampersand Entities android66 Visual Basic 2005 Basics 2 February 5th, 2005 04:46 AM
AMPERSAND disappears when given along with # happygv Forum and Wrox.com Feedback 2 October 25th, 2004 09:49 PM
ampersand in a querystring trangd Beginning PHP 3 October 23rd, 2003 07:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.