Solved

how show the quotation <input type = "text"  nale = "d" value=" he said,"I love you" " >?

Posted on 2004-10-20
7
191 Views
Last Modified: 2010-04-01
IN ASP I know method server.HTMLEncode(). but in JSP??
any help?
0
Comment
Question by:laoyaobest
7 Comments
 

Author Comment

by:laoyaobest
Comment Utility
<html>
<head>

</head>

<body>

<input type="text" name="non_operation" value="he said,"I love you" ">

</body>
</html>
0
 
LVL 32

Accepted Solution

by:
ldbkutty earned 150 total points
Comment Utility
0
 
LVL 27

Expert Comment

by:rrz
Comment Utility
> but in JSP??
No, just plain java. Use the static methods in the  java.net   package.
URLEncoder.encode(inputString,"UTF-8")
URLDecoder(encodedString,"UTF-8")
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:krishnaashu
Comment Utility


try this


<input type = 'text'  nale = 'd' value=' he said,"I love you" ' >


this will print never use "(double quotes) in html always use '(single quotes)

regds

Krish
0
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
> never use "(double quotes) in html always use '(single quotes)

Errr...  that solves it for double quotes, but what about:

<input type = 'text'  nale = 'd' value=' he'd said,"I love you" ' >

Basically, what everyone else said is the best way forward...encode your string :-)
0
 

Expert Comment

by:Kjarrialberts
Comment Utility
If you're talking about what I think you're talking about then you can use backslash (\) to have the html ignore the qoutation mark.

like so:

<input type="text" nale="d" value="he said \"I love you\"">

this, of course, also works with apostrophes (') or anything else.
0
 

Author Comment

by:laoyaobest
Comment Utility
I will try it tomrrow.
I need to solve both /*value=' he said,"I love you" ' */ and  /*value=' he'd said,"I love you" ' */
So I must encode my string.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
communication with a non technical owner 16 97
J2SE 5.0 metadata 1 44
oracle fusion vs MQ 2 90
mask rule in struts validation.xml 5 67
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now