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>str ing</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 1974
<s.********@gma il.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****@stanford alumni.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****@stanford alumni.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.********@gmai l.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>str ing</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 javascript, I get an "error on page" warning and the page is not displayed. I suppose that when Internet Explorer discovers a <script> tag he starts to interpret it. This is not what I want. After all Internet Explorer is a browser and not an...
|
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 become
visible....If they keep the dropdown box at "No" (default) then I want
to submit the form "as is", keeping the inapplicable HTML fields
hidden....I'm trying an "if statement" in ASP....Here's my code....I'm
thinking that the if statement...
|
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 display all of the data (multiple
lines) in a resulting HTML page. The data displays on a single line
(obviously) and does not wrap without manipulation of the string variable.
Is there an easier way to display the data?
Thanks,
Joe
|
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 but a closed table design and
limited space require me to scroll the data loaded from the database.
I need to avoid LAYERS for the sake of cross browser compatability
(some 3rd world users) so would really like to stick to the TEXTAREA.
|
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 JavaScript
in this code from a couple different sites but I'm not 100% sure what
each line is doing...This is the ASP code that I'm using for the
page....Take a look at the JavaScript code and please let me know what
each line is doing....I have been...
| |
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 particular setup, which
I do not have. That is IE 6.0.2800.1106. It appears normal in other
versions of IE and Firefox.
The HTML markup is included below. Note that there are no CSS
properties attached to these elements aside from the style attribute...
|
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?
Thanks a lot.
Tony
|
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 not.
Question:
|
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 file name will
be fine as well. Once a text file is selected, I just need to display
it in a text box.
Thanks for the help.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |