We have an input field which allows the user to enter a string of (up
to 62) ASCII printable characters. We have a need to allow the user to
be able to specify any sequence of characters he/she desires.
However, we have a problem when we attempt to display this same string
of characters. If the input sequence of characters contains HTML
interpretable strings of characters, the user's sequence of characters
is not properly displayed. (We are using <td>string</td> to display the
string.)
For example:
If the user enters "ID-12<DALLAS>\STV"
the string is displayed as "ID-12\STV"
The problem is that the text "<DALLAS>" is being interpreted as an HTML
tag. We can circumvent this problem by pre-parsing the display string
and replacing the "<" with "<", resulting in the proper display of
the string.
However, there is a very long list of standard HTML characters whose
mnemonic and/or numeric representations are translated by HTML for
display purposes.
For example:
If the user enters "ID-12¡" or "ID-12¡"
the user expects the string to be displayed as "ID-12¡" or
"ID-12¡", not "ID-12!" (where the "!" actually represents an
inverted exclamation point).
We have tried to display the user's string with <PRE>string</PRE>,
<CODE>string</CODE>, <BLOCKQUOTE>string</BLOCKQUOTE> and even the
deprecated <LISTING>string</LISTING> to no avail. Even though our
reference text implies that the sequence of characters between <PRE>
and </PRE> will not be interpreted by HTML, both of our browsers (MS
and Netscape) do interpret the characters.
Is there any way to display a sequence of characters without the
browser interpreting the sequence of characters?
Thanks,
Siva 2 1962
<s.********@gmail.com> wrote: Is there any way to display a sequence of characters without the browser interpreting the sequence of characters?
See http://www.htmlhelp.com/faq/html/basics.html#show-html
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/
"The early bird gets the worm, but the second mouse gets the cheese."
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/
"The early bird gets the worm, but the second mouse gets the cheese." s.********@gmail.com wrote: The problem is that the text "<DALLAS>" is being interpreted as an HTML tag. We can circumvent this problem by pre-parsing the display string and replacing the "<" with "<", resulting in the proper display of the string.
However, there is a very long list of standard HTML characters whose mnemonic and/or numeric representations are translated by HTML for display purposes.
one, two, many ;)
There are in fact only three characters that must be encoded: '<', '>' and
'&'. A pretty long list, I must admit...
For example: If the user enters "ID-12¡" or "ID-12¡" the user expects the string to be displayed as "ID-12¡" or "ID-12¡", not "ID-12!" (where the "!" actually represents an inverted exclamation point).
It is sufficient to quote the '&' here:
User enters: "ID-12¡"
Inserted into HTML: "ID-12&iexcl;"
Displayed: "ID-12¡"
We have tried to display the user's string with <PRE>string</PRE>, <CODE>string</CODE>, <BLOCKQUOTE>string</BLOCKQUOTE> and even the deprecated <LISTING>string</LISTING> to no avail. Even though our reference text
Time to look for a correct reference text.
implies that the sequence of characters between <PRE> and </PRE> will not be interpreted by HTML, both of our browsers (MS and Netscape) do interpret the characters.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: hoke |
last post by:
I want to display plain text files in the browser. The files contain html and javascript and have a .txt extension.
This works fine with files with just html. Unfortunately when showing files with...
|
by: dmiller23462 |
last post by:
I'm trying to create a submission page for users to request PC/LAN
Access....If they select "Yes" in the field asking about if they need
Non Standard Software, I want several other HTML fields to...
|
by: JStrauss |
last post by:
Hello,
Can anybody give me some tips on the best and/or easiest way to display
multiple lines in a field. The data is collected from a "textarea" field
when the form is submitted, and I want to...
|
by: Richard |
last post by:
I am filling a TEXTAREA with text and links from a database. I need to
display the <a href....> code in the TEXTAREA as a clickable link with
_blank targetting.
I realise I could simply use a TD...
|
by: dmiller23462 |
last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript
but my end result is I need two text boxes to stay hidden until a
particular option is selected....I've cobbled together the...
|
by: groups |
last post by:
Hello, HTML-heads. Odd problem that I haven't encountered before. This
form and/or textarea is appearing to have no columns or no width to the
end user. This only happens to the user on one...
|
by: tony wong |
last post by:
i wish to count number of characters in textarea box during typing in and
display it somewhere in html page. so the number will increase during
writing.
is it possible to do it by javascript?
...
|
by: Erwin Moller |
last post by:
Hi all,
Situation:
A (rather long) page that contains a lot of divs.
Some are visible (display:inline) at a certain time, other not.
The javascript is responsible for divs to be visible or...
|
by: jiayanxiang |
last post by:
Is there any sample code to use Javascript to load and display a text
file?
It will be best if the user can select files using some kind of
explorer. If that's complex, a text box to specify the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |