Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript 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 February 1st, 2008, 02:26 PM
Authorized User
 
Join Date: Feb 2008
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get the special chars(%#&'') from JSP to Ja

Hi Friends
I have a text box in my JSP. I can enter anything in the text box. And I have to retrive the value from JSP and store it in DB. I'm getting all the special characters except &%#. I tried with URL rewriting and setting into form also. Whenever I enter %#&, I'm getting empty values. How can I get these chars. Please help me.

Regards
Kasi
__________________
Regards
Kasi
 
Old February 3rd, 2008, 11:48 AM
Authorized User
 
Join Date: Jun 2007
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi kasipandian

Which method do you use to send data to server?

It seems that you have used 'GET' method. In this method, all sending parameters are concatenated at the end of request URL (e.g. http://url?data2=lobloblob&data2=bolbolbol.

As some characters like '%' and '#' can't be used in URI, when your data contains such characters, your server code would not retrieve correct data. I think methods like encodeURI and encodeURIComponent can help you in this situations.

In your client code, call one of these Javascript methods and pass your sending data to one of them (I don't actualy know which would solve your problem) and send their returned value to your server. You can find more documentation on these methods on MSDN available at :

http://msdn2.microsoft.com/en-us/library/52f50e9t.aspx

Regards



Ehsan Zaery Moghaddam





Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV files export with Classic ASP, special chars tn_bobbie Classic ASP Basics 1 July 9th, 2015 08:12 AM
logo link in the header & strange chars - mail luisjeronimo BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 June 26th, 2007 11:07 AM
jsp & tomcat aruna_k_2006 JSP Basics 1 March 23rd, 2007 07:16 AM
Special Character issue in JSP Janardhana M Pro JSP 8 July 12th, 2006 11:21 PM
storing special special characters in nvarchar... ACE2084 SQL Server 2000 2 February 9th, 2005 11:45 AM





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