aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes escape single quote in input type=hidden Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "escape single quote in input type=hidden" Watch "escape single quote in input type=hidden" New topic
Author

escape single quote in input type=hidden

Vivek Gupta
Greenhorn

Joined: May 02, 2005
Posts: 23
How can I retrieve the value in the hidden input if there is a single quote involved in the value of the hidden attribute

For example
<INPUT TYPE=hidden name='hdInput' value='JSP's Content'>

At back-end(Java Code), I could only retrieve JSP for hdInput.
How can I get the complete JSP's Content
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56192
    
  13

Moved to the HTML forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
try putting the value attribute in double quotes if you are sure that double quotes wont be there.



Life called,so here I am.<br />Cheers<br />Niki.:-)
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
If you use hidden textarea with absolute positioning, you don't need to escape anything.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: escape single quote in input type=hidden
 
Similar Threads
escape single quote in input type=hidden
Adding two variables in java script.
trying to submit form on another site from my JSP
Issue when retrieveing the hidden variable in script and setting the locale of dojoconfig
How to retrive data two times from database in sinble jsp page.