473,513 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

insert text dynamically into textarea

how do i use javascript function to dynamically insert text into
textarea from the result of an array comparison expression. read the
dom but found no way out.
thanks

Jul 18 '07 #1
5 3085
cyprian wrote:
how do i use javascript function to dynamically insert text into
textarea from the result of an array comparison expression. read the
dom but found no way out.
thanks
What is a "array comparison expression" ?
More details needed.
Mick
Jul 18 '07 #2

"cyprian" <cy***********@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
how do i use javascript function to dynamically insert text into
textarea from the result of an array comparison expression. read the
Regardless of what it is a result of, you can set the value property of the
textarea element.
dom but found no way out.
Try looking up "createTextNode" and "appendChild."
Jul 18 '07 #3
David Mark said the following on 7/22/2007 7:09 PM:
On Jul 22, 6:45 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
>David Mark said the following on 7/22/2007 2:00 PM:


>>On Jul 21, 9:48 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
David Mark said the following on 7/21/2007 3:41 PM:
On Jul 21, 2:22 am, Randy Webb <HikksNotAtH...@aol.comwrote:
>David Mark said the following on 7/20/2007 2:54 PM:
>>One Dumm Hikk wrote:
>>>On Jul 18, 2:05 pm, "David Mark" <dm...@cinsoft.netwrote:
>>>>"cyprian" <cyprian.ek...@gmail.comwrote in message
>>>>news:11**********************@o11g2000prd. googlegroups.com...
<snip>
<snip that probably isn't proper>
>>>>I am sure you understand the value of having content in XML as most
of the Web understands RSS (for example.)
And you have not seen me say differently. We are not discussing XML, we
are discussing XHTML and - directly - it's use as a language on the Web.
As I am sure you know, XHTML is XML. That's the whole point. Just
like RSS and XHTML Basic are XML. You can easily transform one flavor
into another, but you can't efficiently transform HTML into anything
useful.
That is why I don't store static HTML. To do that is idiotic if you want
to transform it.

So what do you store then? I assume XML, which would mean your server
has to transform it to HTML with each request.
Actually, there are very very few HTML files on the Intranet server that
I use. Most of the data is stored in a database and creates .js files on
the fly. Everything in the system was designed with two things in mind -
speed and server load. The more I can make the client machine do then
the less my server has to do. Switching to the current back end system
(the front end looks almost identical to the old version) took almost 3
years and more hours of work than I care to remember. It has sped up my
Intranet almost 10-fold by moving the processing load from the server to
the client machine.

The public website is slowly being migrated to the same system of using
..js files loaded on the fly. I have found it to be simpler, more
reliable, and quicker than trying to make XHR requests and deal with the
response. The major issue with the website being migrated is the lack of
support and problems with loading .js files on mac platforms and some of
the older legacy PC browsers. If, and when, the support becomes more
available on mac browsers and the legacy PC browsers are finally dead
and gone, the website will be switched to the same system as well.

As for transforming XML to HTML, you might try looking at the
process.wsf file and the index.xml file that is used to create this very
groups FAQ. Edit the xml file, run the process.wsf file, and it creates
the HTML file on the fly for you. So no, I don't buy into the "Its
easier to transform XML to XHTML than HTML" argument.

<snip>
>>It seems to me that the real concern of the "XHTML is harmful on the
Web" crowd is that 90% of the authors don't know what it is. But that
is not my concern.
<URL:http://www.spartanicus.utvinternet.ie/no-xhtml.htm>
Try it and the links in it......

I've seen many sites just like it. That particular one seems outdated
as it warns about Opera 7, which prefers HTML (not a problem if you
negotiate properly.) The latest Opera browsers prefer XHTML.
While it is slightly outdated, the only information on that page that is
still outdated is indeed the warning about Opera 7. The other issues
that it brings up are still valid issues for not serving XHTML on the
web though. If you want to serve XHTML on the web, by all means do so.
Just don't expect to push it here in comp.lang.javascript without being
challenged on it as the benefits of XHTML simply are not worth the
effort when it comes to trying to serve it to IE and causing IE to bog
down to try to parse it as tag soup HTML.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 23 '07 #4
On Jul 23, 1:23 am, Randy Webb <HikksNotAtH...@aol.comwrote:
David Mark said the following on 7/22/2007 7:09 PM:


On Jul 22, 6:45 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
David Mark said the following on 7/22/2007 2:00 PM:
>On Jul 21, 9:48 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
David Mark said the following on 7/21/2007 3:41 PM:
On Jul 21, 2:22 am, Randy Webb <HikksNotAtH...@aol.comwrote:
David Mark said the following on 7/20/2007 2:54 PM:
>One Dumm Hikk wrote:
>>On Jul 18, 2:05 pm, "David Mark" <dm...@cinsoft.netwrote:
>>>"cyprian" <cyprian.ek...@gmail.comwrote in message
>>>>news:11**********************@o11g2000prd. googlegroups.com...
<snip>

<snip that probably isn't proper>
>>>I am sure you understand the value of having content in XML as most
of the Web understands RSS (for example.)
And you have not seen me say differently. We are not discussing XML, we
are discussing XHTML and - directly - it's use as a language on the Web.
As I am sure you know, XHTML is XML. That's the whole point. Just
like RSS and XHTML Basic are XML. You can easily transform one flavor
into another, but you can't efficiently transform HTML into anything
useful.
That is why I don't store static HTML. To do that is idiotic if you want
to transform it.
So what do you store then? I assume XML, which would mean your server
has to transform it to HTML with each request.

Actually, there are very very few HTML files on the Intranet server that
I use. Most of the data is stored in a database and creates .js files on
the fly. Everything in the system was designed with two things in mind -
speed and server load. The more I can make the client machine do then
the less my server has to do. Switching to the current back end system
(the front end looks almost identical to the old version) took almost 3
years and more hours of work than I care to remember. It has sped up my
Intranet almost 10-fold by moving the processing load from the server to
the client machine.
What do JS files have to do with the XHTML vs. HTML discussion?
>
The public website is slowly being migrated to the same system of using
.js files loaded on the fly. I have found it to be simpler, more
reliable, and quicker than trying to make XHR requests and deal with the
response. The major issue with the website being migrated is the lack of
support and problems with loading .js files on mac platforms and some of
the older legacy PC browsers. If, and when, the support becomes more
available on mac browsers and the legacy PC browsers are finally dead
and gone, the website will be switched to the same system as well.

As for transforming XML to HTML, you might try looking at the
process.wsf file and the index.xml file that is used to create this very
groups FAQ. Edit the xml file, run the process.wsf file, and it creates
the HTML file on the fly for you. So no, I don't buy into the "Its
easier to transform XML to XHTML than HTML" argument.
That wasn't my argument. Of course you transform XML into HTML. What
is silly is transforming XHTML into HTML, when you could just send the
XHTML.
>
<snip>
>It seems to me that the real concern of the "XHTML is harmful on the
Web" crowd is that 90% of the authors don't know what it is. But that
is not my concern.
<URL:http://www.spartanicus.utvinternet.ie/no-xhtml.htm>
Try it and the links in it......
I've seen many sites just like it. That particular one seems outdated
as it warns about Opera 7, which prefers HTML (not a problem if you
negotiate properly.) The latest Opera browsers prefer XHTML.

While it is slightly outdated, the only information on that page that is
still outdated is indeed the warning about Opera 7. The other issues
that it brings up are still valid issues for not serving XHTML on the
web though. If you want to serve XHTML on the web, by all means do so.
Just don't expect to push it here in comp.lang.javascript without being
I don't push anything in here. I think the original discussion arose
from some silly tag line of yours that insulted anyone and everyone
who used XHTML on the Web. So don't expect to do that without being
challenged. Or perhaps you can as I am growing weary of this whole
argument.
Jul 23 '07 #5
David Mark said the following on 7/23/2007 2:25 PM:
On Jul 23, 1:23 am, Randy Webb <HikksNotAtH...@aol.comwrote:
<snip>
>>So what do you store then? I assume XML, which would mean your server
^^^^^^^^^^^^^^^^^^^^^^^^^^
>>has to transform it to HTML with each request.
Actually, there are very very few HTML files on the Intranet server that
I use. Most of the data is stored in a database and creates .js files on
the fly. Everything in the system was designed with two things in mind -
speed and server load. The more I can make the client machine do then
the less my server has to do. Switching to the current back end system
(the front end looks almost identical to the old version) took almost 3
years and more hours of work than I care to remember. It has sped up my
Intranet almost 10-fold by moving the processing load from the server to
the client machine.

What do JS files have to do with the XHTML vs. HTML discussion?
See the question you asked? The one where you asked "So what do you
store then?". You asked a question, I answered and explained some of why
I chose that path.
>The public website is slowly being migrated to the same system of using
.js files loaded on the fly. I have found it to be simpler, more
reliable, and quicker than trying to make XHR requests and deal with the
response. The major issue with the website being migrated is the lack of
support and problems with loading .js files on mac platforms and some of
the older legacy PC browsers. If, and when, the support becomes more
available on mac browsers and the legacy PC browsers are finally dead
and gone, the website will be switched to the same system as well.

As for transforming XML to HTML, you might try looking at the
process.wsf file and the index.xml file that is used to create this very
groups FAQ. Edit the xml file, run the process.wsf file, and it creates
the HTML file on the fly for you. So no, I don't buy into the "Its
easier to transform XML to XHTML than HTML" argument.

That wasn't my argument. Of course you transform XML into HTML. What
is silly is transforming XHTML into HTML, when you could just send the
XHTML.
We are right back where we started. Sheesh. You have two choices:

1) Send HTML to any browser.
2) Send XHTML to a browser that doesn't understand it and parses it as
tag soup so that 10% of the web can use XHTML.

The latter isn't worth the time and effort.
><snip>
>>>>It seems to me that the real concern of the "XHTML is harmful on the
Web" crowd is that 90% of the authors don't know what it is. But that
is not my concern.
<URL:http://www.spartanicus.utvinternet.ie/no-xhtml.htm>
Try it and the links in it......
I've seen many sites just like it. That particular one seems outdated
as it warns about Opera 7, which prefers HTML (not a problem if you
negotiate properly.) The latest Opera browsers prefer XHTML.
While it is slightly outdated, the only information on that page that is
still outdated is indeed the warning about Opera 7. The other issues
that it brings up are still valid issues for not serving XHTML on the
web though. If you want to serve XHTML on the web, by all means do so.
Just don't expect to push it here in comp.lang.javascript without being

I don't push anything in here. I think the original discussion arose
from some silly tag line of yours that insulted anyone and everyone
who used XHTML on the Web.
It arose from my opinion that I stated in a signature. It was based on
my personal experience and reading. And, anytime anyone suggests using
XHTML on the web, until it is supported by IE, I will state that opinion
again.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
11571
by: Max | last post by:
i want to insert a predefined string in a textarea when i right click on the mouse. i need to do it in internet explorer and mozilla.
4
11179
by: dekern | last post by:
I have been trying to set the default text value of a TextArea element for about a day now without any luck. Similar to the code used to set the Text field below I would like to use the returned...
12
8328
by: who be dat? | last post by:
I'm trying to make a webpage do the following: I want a user to be able to click on a given image (there will be more than one image). Upon clicking a given image, characters specific to that...
2
3249
by: Lloyd | last post by:
I am trying to insert text in a text area. I need to insert one set of values on the left side of the text area and have corresponding values on the left side of the text area in an even column....
1
5000
by: solomon_13000 | last post by:
connection.asp: <% Sub RunQueryString (pSQL,parms) on error resume next Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &...
3
6461
by: ctrap | last post by:
Hi Everyone, Here's my situation: I'm making a website for an employment agency, there is a page where potential employees can visit and "pre-register". When the submit button is hit the...
15
1791
by: globalrev | last post by:
i have a translator-program for the robbers language. i want the user to input into the topwindow and then display the encryption or decryption in the bottom window. i am currently trying to...
58
8015
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
0
7158
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...
0
7380
Oralloy
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,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
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...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4745
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...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.