By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,963 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,963 IT Pros & Developers. It's quick & easy.

Best way to access a textarea within a DIV

P: n/a
Hello

I have a DIV with various elements eg:

<div ARID="8" ARType="Char" ARDBN="Short Description">
<label class="label f9" for="arid8"Short Description</label>
<textarea class="text sr " wrap="off" id="arid8" rows=1></textarea>
</div>

I have a variable, divs, which contains the DIV's and divs[x] contains
the actual DIV I need.

What is the best (or most robust) way to access the inner textarea -
because I want to add some text to the textarea field. I know how to
add the text but want to know best way to access the textarea.

Angus

Apr 20 '07 #1
Share this Question
Share on Google+
23 Replies


P: n/a
On 20 Apr 2007 03:51:03 -0700, in comp.lang.javascript Angus
<an*********@gmail.com>
<11*********************@b75g2000hsg.googlegroups. comwrote:
>| Hello
|
| I have a DIV with various elements eg:
|
| <div ARID="8" ARType="Char" ARDBN="Short Description">
| <label class="label f9" for="arid8"Short Description</label>
| <textarea class="text sr " wrap="off" id="arid8" rows=1></textarea>
| </div>
|
| I have a variable, divs, which contains the DIV's and divs[x] contains
| the actual DIV I need.
|
| What is the best (or most robust) way to access the inner textarea -
| because I want to add some text to the textarea field. I know how to
| add the text but want to know best way to access the textarea.
Assumng that the id is unique:
var txt = document.getElementById("arid8").value;

BTW why are you using a <textarea /and not <input type="text" /?
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 20 '07 #2

P: n/a
>>What is the best (or most robust) way to access the inner textarea -
>>because I want to add some text to the textarea field. I know how
to add the text but want to know best way to access the textarea.

Assumng that the id is unique:
var txt = document.getElementById("arid8").value;

BTW why are you using a <textarea /and not <input type="text" /?
Why would an input field be preferable to a textarea?
Apr 20 '07 #3

P: n/a
On 20 Apr, 12:30, Jeff North <jnort...@yahoo.com.auwrote:
On 20 Apr 2007 03:51:03 -0700, in comp.lang.javascript Angus
<anguscom...@gmail.com>

<1177066263.052565.83...@b75g2000hsg.googlegroups. comwrote:
| Hello
|
| I have a DIV with various elements eg:
|
| <div ARID="8" ARType="Char" ARDBN="Short Description">
| <label class="label f9" for="arid8"Short Description</label>
| <textarea class="text sr " wrap="off" id="arid8" rows=1></textarea>
| </div>
|
| I have a variable, divs, which contains the DIV's and divs[x] contains
| the actual DIV I need.
|
| What is the best (or most robust) way to access the inner textarea -
| because I want to add some text to the textarea field. I know how to
| add the text but want to know best way to access the textarea.

Assumng that the id is unique:
var txt = document.getElementById("arid8").value;

BTW why are you using a <textarea /and not <input type="text" /?
---------------------------------------------------------------
jnort...@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
if you try the html sample, var txt =
document.getElementById("arid8").value; doesn't work. Didn't work
either in IE or FF.

It should work but it doesn't seem to. So my next thought is how can
I get the child elements of the DIV that I know contains the textarea?

the textarea is so users can enter multiple lines of text.

Apr 20 '07 #4

P: n/a
On 20 Apr, 14:22, Angus <anguscom...@gmail.comwrote:
On 20 Apr, 12:30, Jeff North <jnort...@yahoo.com.auwrote:
On 20 Apr 2007 03:51:03 -0700, in comp.lang.javascript Angus
<anguscom...@gmail.com>
<1177066263.052565.83...@b75g2000hsg.googlegroups. comwrote:
>| Hello
>|
>| I have a DIV with various elements eg:
>|
>| <div ARID="8" ARType="Char" ARDBN="Short Description">
>| <label class="label f9" for="arid8"Short Description</label>
>| <textarea class="text sr " wrap="off" id="arid8" rows=1></textarea>
>| </div>
>|
>| I have a variable, divs, which contains the DIV's and divs[x] contains
>| the actual DIV I need.
>|
>| What is the best (or most robust) way to access the inner textarea -
>| because I want to add some text to the textarea field. I know how to
>| add the text but want to know best way to access the textarea.
Assumng that the id is unique:
var txt = document.getElementById("arid8").value;
BTW why are you using a <textarea /and not <input type="text" /?
---------------------------------------------------------------
jnort...@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

if you try the html sample, var txt =
document.getElementById("arid8").value; doesn't work. Didn't work
either in IE or FF.

It should work but it doesn't seem to. So my next thought is how can
I get the child elements of the DIV that I know contains the textarea?

the textarea is so users can enter multiple lines of text.
I had to find a solution for IE - as below:

// insert text into a TEXTAREA by Fieldname
function InsertTextToFieldByFieldname(fieldname, postvalue)
{
var divs = document.getElementsByTagName("DIV"); // this gets all
DIV's
for (var i = 0; i < divs.length; i++)
{
if (divs[i].ARDBN == fieldname)
{
// we have the right DIV section now
var children = divs[i].childNodes;
for (var j=0; j < children.length; j++)
{
if (children[j].tagName == "TEXTAREA")
{
// post some data
children[j].value = postvalue;
}
}
}
}
}

But it didn't work in FF. So that will be a project for later.

Apr 20 '07 #5

P: n/a
On Fri, 20 Apr 2007 11:38:32 GMT, in comp.lang.javascript "M.L."
<me@privacy.net>
<YC*****************@newssvr14.news.prodigy.netwro te:
>| >>What is the best (or most robust) way to access the inner textarea -
| >>because I want to add some text to the textarea field. I know how
| >>to add the text but want to know best way to access the textarea.
| >
| Assumng that the id is unique:
| var txt = document.getElementById("arid8").value;
| >
| BTW why are you using a <textarea /and not <input type="text" /?
|
| Why would an input field be preferable to a textarea?
A textarea is for entering large amounts of text/data and will accept
linefeeds as part of the input.

A input/text control is for entering up to 255 characters of data. You
can also restrict the number of characters that this field will accept
(maxlength attribute).

---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 20 '07 #6

P: n/a
On 20 Apr 2007 06:22:04 -0700, in comp.lang.javascript Angus
<an*********@gmail.com>
<11**********************@y5g2000hsa.googlegroups. comwrote:
>| On 20 Apr, 12:30, Jeff North <jnort...@yahoo.com.auwrote:
| On 20 Apr 2007 03:51:03 -0700, in comp.lang.javascript Angus
| <anguscom...@gmail.com>
| >
| >
| >
| <1177066263.052565.83...@b75g2000hsg.googlegroups. comwrote:
| | Hello
| |
| | I have a DIV with various elements eg:
| |
| | <div ARID="8" ARType="Char" ARDBN="Short Description">
| | <label class="label f9" for="arid8"Short Description</label>
| | <textarea class="text sr " wrap="off" id="arid8" rows=1></textarea>
| | </div>
| |
| | I have a variable, divs, which contains the DIV's and divs[x] contains
| | the actual DIV I need.
| |
| | What is the best (or most robust) way to access the inner textarea -
| | because I want to add some text to the textarea field. I know how to
| | add the text but want to know best way to access the textarea.
| >
| Assumng that the id is unique:
| var txt = document.getElementById("arid8").value;
| >
| BTW why are you using a <textarea /and not <input type="text" /?
|
| if you try the html sample, var txt =
| document.getElementById("arid8").value; doesn't work. Didn't work
| either in IE or FF.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function getinfo()
{
var obj = document.getElementById("arid8");
alert(obj.id + " : " + obj.value);
}
</script>
</head>
<body>
<div arid="8" artype="Char" ardbn="Short Description">
<label class="label f9" for="arid8">Short Description</label>
<textarea class="text sr " wrap="off" id="arid8" rows=1></textarea>
<input type="button" name="Button" value="Button"
onclick="getinfo();" />
</div>
</body>
</html>

>| It should work but it doesn't seem to. So my next thought is how can
| I get the child elements of the DIV that I know contains the textarea?
|
| the textarea is so users can enter multiple lines of text.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 20 '07 #7

P: n/a
Jeff North said the following on 4/20/2007 6:04 PM:

<snip>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Any, and all, testing done in any version of IE with an XHTML doctype is
a crap shoot though. Why give a browser something it can't handle and
will consequently turn it into tag soup HTML operating under a
transitional 4.0 quirks mode?

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

P: n/a
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
For the Internet, HTML is preferred by those in the know:

http://www.thewebcreator.net/2007/04...tead-of-xhtml/

Peter

Apr 21 '07 #9

P: n/a
Peter Michaux said the following on 4/20/2007 8:07 PM:
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

For the Internet, HTML is preferred by those in the know:

http://www.thewebcreator.net/2007/04...tead-of-xhtml/
According to the comments on that page, this page:

<URL: http://www.webdevout.net/articles/beware-of-xhtml>

Would be a better resource to reference to :-)

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

P: n/a
On 20 Apr 2007 17:07:55 -0700, in comp.lang.javascript Peter Michaux
<pe**********@gmail.com>
<11*********************@e65g2000hsc.googlegroups. comwrote:
>| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| For the Internet, HTML is preferred by those in the know:
|
| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
|
Obviously the author(s) don't practice what they preach:
View Source from the above web site reveals:
---------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 21 '07 #11

P: n/a
On Fri, 20 Apr 2007 21:41:50 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<jY********************@giganews.comwrote:
>| Peter Michaux said the following on 4/20/2007 8:07 PM:
| ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >
| For the Internet, HTML is preferred by those in the know:
| >
| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
|
| According to the comments on that page, this page:
|
| <URL: http://www.webdevout.net/articles/beware-of-xhtml>
|
| Would be a better resource to reference to :-)
HTML Tidy reports on the above web site
---------------------------------------
Info: Doctype given is "-//W3C//DTD HTML 4.01//EN"
Info: Document content looks like XHTML 1.0 Strict

---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 21 '07 #12

P: n/a
Jeff North said the following on 4/21/2007 4:58 AM:
On 20 Apr 2007 17:07:55 -0700, in comp.lang.javascript Peter Michaux
<pe**********@gmail.com>
<11*********************@e65g2000hsc.googlegroups. comwrote:
>| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| For the Internet, HTML is preferred by those in the know:
|
| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
|

Obviously the author(s) don't practice what they preach:
View Source from the above web site reveals:
---------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
If you had read the blog comments on that page you would know that the
blog it is posted on is not the blog site of the author of the article.
The article was copy/pasted from the original site which is the URL I gave.

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

P: n/a
Jeff North said the following on 4/21/2007 4:59 AM:
On Fri, 20 Apr 2007 21:41:50 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<jY********************@giganews.comwrote:
>| Peter Michaux said the following on 4/20/2007 8:07 PM:
| ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >
| For the Internet, HTML is preferred by those in the know:
| >
| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
|
| According to the comments on that page, this page:
|
| <URL: http://www.webdevout.net/articles/beware-of-xhtml>
|
| Would be a better resource to reference to :-)

HTML Tidy reports on the above web site
---------------------------------------
Info: Doctype given is "-//W3C//DTD HTML 4.01//EN"
Info: Document content looks like XHTML 1.0 Strict
It could just as well say "It looks like monkeyHTML" and it wouldn't
make a lot of difference.

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

P: n/a
On Sat, 21 Apr 2007 13:26:51 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<f5********************@giganews.comwrote:
>| Jeff North said the following on 4/21/2007 4:58 AM:
| On 20 Apr 2007 17:07:55 -0700, in comp.lang.javascript Peter Michaux
| <pe**********@gmail.com>
| <11*********************@e65g2000hsc.googlegroups. comwrote:
| >
| >| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >|
| >| For the Internet, HTML is preferred by those in the know:
| >|
| >| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
| >|
| >
| Obviously the author(s) don't practice what they preach:
| View Source from the above web site reveals:
| ---------------------------------------------
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml">
|
| If you had read the blog comments on that page you would know that the
| blog it is posted on is not the blog site of the author of the article.
| The article was copy/pasted from the original site which is the URL I gave.
That's a pretty poor excuse for "do as I say, not as I do".
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 21 '07 #15

P: n/a
On Sat, 21 Apr 2007 13:28:42 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<f5********************@giganews.comwrote:
>| Jeff North said the following on 4/21/2007 4:59 AM:
| On Fri, 20 Apr 2007 21:41:50 -0400, in comp.lang.javascript Randy Webb
| <Hi************@aol.com>
| <jY********************@giganews.comwrote:
| >
| >| Peter Michaux said the following on 4/20/2007 8:07 PM:
| >| ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >| >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >| >
| >| For the Internet, HTML is preferred by those in the know:
| >| >
| >| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
| >|
| >| According to the comments on that page, this page:
| >|
| >| <URL: http://www.webdevout.net/articles/beware-of-xhtml>
| >|
| >| Would be a better resource to reference to :-)
| >
| HTML Tidy reports on the above web site
| ---------------------------------------
| Info: Doctype given is "-//W3C//DTD HTML 4.01//EN"
| Info: Document content looks like XHTML 1.0 Strict
|
| It could just as well say "It looks like monkeyHTML" and it wouldn't
| make a lot of difference.
If you can trust the 'official tools' then what do you trust?
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 21 '07 #16

P: n/a
Jeff North said the following on 4/21/2007 4:53 PM:
On Sat, 21 Apr 2007 13:28:42 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<f5********************@giganews.comwrote:
>| Jeff North said the following on 4/21/2007 4:59 AM:
| On Fri, 20 Apr 2007 21:41:50 -0400, in comp.lang.javascript Randy Webb
| <Hi************@aol.com>
| <jY********************@giganews.comwrote:
| >
| >| Peter Michaux said the following on 4/20/2007 8:07 PM:
| >| ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >| >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >| >
| >| For the Internet, HTML is preferred by those in the know:
| >| >
| >| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
| >|
| >| According to the comments on that page, this page:
| >|
| >| <URL: http://www.webdevout.net/articles/beware-of-xhtml>
| >|
| >| Would be a better resource to reference to :-)
| >
| HTML Tidy reports on the above web site
| ---------------------------------------
| Info: Doctype given is "-//W3C//DTD HTML 4.01//EN"
| Info: Document content looks like XHTML 1.0 Strict
|
| It could just as well say "It looks like monkeyHTML" and it wouldn't
| make a lot of difference.

If you can trust the 'official tools' then what do you trust?
HTMLTidy is an "official tool"? It still doesnt matter. The original
article, which was copied with permission, was written in precisely what
the author was saying - HTML4.01. The fact that some piece of software
says "Hey, that looks like XHTML" is irrelevant. All that means, to me,
is that it would be trivial to convert it but it does *not* make it
XHTML just because it "looks like it".

Your posting agent is broken.

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

P: n/a
On Apr 21, 1:52 pm, Jeff North <jnort...@yahoo.com.auwrote:
On Sat, 21 Apr 2007 13:26:51 -0400, in comp.lang.javascript Randy Webb
<HikksNotAtH...@aol.com>

<f5ydnRzmf_S51Lfb4p2...@giganews.comwrote:
| Jeff North said the following on 4/21/2007 4:58 AM:
| On 20 Apr 2007 17:07:55 -0700, in comp.lang.javascript Peter Michaux
| <petermich...@gmail.com>
| <1177114075.902846.78...@e65g2000hsc.googlegroups. comwrote:
| >
| >| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >|
| >| For the Internet, HTML is preferred by those in the know:
| >|
| >|http://www.thewebcreator.net/2007/04...be-using-html-...
| >|
| >
| Obviously the author(s) don't practice what they preach:
| View Source from the above web site reveals:
| ---------------------------------------------
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml">
|
| If you had read the blog comments on that page you would know that the
| blog it is posted on is not the blog site of the author of the article.
| The article was copy/pasted from the original site which is the URL I gave.

That's a pretty poor excuse for "do as I say, not as I do".
I don't think so. Just because one knows how to do something it
doesn't mean one cares enough about blog software to spend time fixing
it. I spend my time making software for clients good. One day I will
get around to fixing my blog software which also stupidly uses XHTML.
It is just way down on the priority list.

Peter

Apr 21 '07 #18

P: n/a
Jeff North said the following on 4/21/2007 4:52 PM:
On Sat, 21 Apr 2007 13:26:51 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<f5********************@giganews.comwrote:
>| Jeff North said the following on 4/21/2007 4:58 AM:
| On 20 Apr 2007 17:07:55 -0700, in comp.lang.javascript Peter Michaux
| <pe**********@gmail.com>
| <11*********************@e65g2000hsc.googlegroups. comwrote:
| >
| >| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >|
| >| For the Internet, HTML is preferred by those in the know:
| >|
| >| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
| >|
| >
| Obviously the author(s) don't practice what they preach:
| View Source from the above web site reveals:
| ---------------------------------------------
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml">
|
| If you had read the blog comments on that page you would know that the
| blog it is posted on is not the blog site of the author of the article.
| The article was copy/pasted from the original site which is the URL I gave.

That's a pretty poor excuse for "do as I say, not as I do".
For the person who copied the article, yes. For the author of the
article, they did exactly what they said to do - use HTML4.01

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

P: n/a
On Sat, 21 Apr 2007 17:04:47 -0400, in comp.lang.javascript Randy Webb
<Hi************@aol.com>
<Ps********************@giganews.comwrote:
>| Jeff North said the following on 4/21/2007 4:53 PM:
| On Sat, 21 Apr 2007 13:28:42 -0400, in comp.lang.javascript Randy Webb
| <Hi************@aol.com>
| <f5********************@giganews.comwrote:
| >
| >| Jeff North said the following on 4/21/2007 4:59 AM:
| >| On Fri, 20 Apr 2007 21:41:50 -0400, in comp.lang.javascript Randy Webb
| >| <Hi************@aol.com>
| >| <jY********************@giganews.comwrote:
| >| >
| >| >| Peter Michaux said the following on 4/20/2007 8:07 PM:
| >| >| ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >| >| >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >| >| >
| >| >| For the Internet, HTML is preferred by those in the know:
| >| >| >
| >| >| http://www.thewebcreator.net/2007/04...tead-of-xhtml/
| >| >|
| >| >| According to the comments on that page, this page:
| >| >|
| >| >| <URL: http://www.webdevout.net/articles/beware-of-xhtml>
| >| >|
| >| >| Would be a better resource to reference to :-)
| >| >
| >| HTML Tidy reports on the above web site
| >| ---------------------------------------
| >| Info: Doctype given is "-//W3C//DTD HTML 4.01//EN"
| >| Info: Document content looks like XHTML 1.0 Strict
| >|
| >| It could just as well say "It looks like monkeyHTML" and it wouldn't
| >| make a lot of difference.
| >
| If you can trust the 'official tools' then what do you trust?
|
| HTMLTidy is an "official tool"?
You know what I meant (thus the quotation marks). Don't play the fool.
>| It still doesnt matter. The original
| article, which was copied with permission, was written in precisely what
| the author was saying - HTML4.01. The fact that some piece of software
| says "Hey, that looks like XHTML" is irrelevant. All that means, to me,
| is that it would be trivial to convert it but it does *not* make it
| XHTML just because it "looks like it".
|
| Your posting agent is broken.
In what respect?
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 22 '07 #20

P: n/a
On 21 Apr 2007 14:03:55 -0700, in comp.lang.javascript Peter Michaux
<pe**********@gmail.com>
<11**********************@b75g2000hsg.googlegroups .comwrote:
>| On Apr 21, 1:52 pm, Jeff North <jnort...@yahoo.com.auwrote:
| On Sat, 21 Apr 2007 13:26:51 -0400, in comp.lang.javascript Randy Webb
| <HikksNotAtH...@aol.com>
| >
| >
| >
| <f5ydnRzmf_S51Lfb4p2...@giganews.comwrote:
| | Jeff North said the following on 4/21/2007 4:58 AM:
| | On 20 Apr 2007 17:07:55 -0700, in comp.lang.javascript Peter Michaux
| | <petermich...@gmail.com>
| | <1177114075.902846.78...@e65g2000hsc.googlegroups. comwrote:
| | >
| | >| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| | >| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| | >|
| | >| For the Internet, HTML is preferred by those in the know:
| | >|
| | >|http://www.thewebcreator.net/2007/04...be-using-html-...
| | >|
| | >
| | Obviously the author(s) don't practice what they preach:
| | View Source from the above web site reveals:
| | ---------------------------------------------
| | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| | <html xmlns="http://www.w3.org/1999/xhtml">
| |
| | If you had read the blog comments on that page you would know that the
| | blog it is posted on is not the blog site of the author of the article.
| | The article was copy/pasted from the original site which is the URL I gave.
| >
| That's a pretty poor excuse for "do as I say, not as I do".
|
| I don't think so. Just because one knows how to do something it
| doesn't mean one cares enough about blog software to spend time fixing
| it.
You copied/pasted (with permission) the article from another site.
Obviously you felt strongly enough to post the full text, not just a
link. Yet you don't follow your own convictions.
>| I spend my time making software for clients good. One day I will
| get around to fixing my blog software which also stupidly uses XHTML.
| It is just way down on the priority list.
I would hope so - W3 validation reports 43 errors, 26 warnings and
numerous information messages for your page.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 22 '07 #21

P: n/a
Hi Jeff,
| That's a pretty poor excuse for "do as I say, not as I do".
|
| I don't think so. Just because one knows how to do something it
| doesn't mean one cares enough about blog software to spend time fixing
| it.

You copied/pasted (with permission) the article from another site.
That article doesn't appear on my blog.

Regardless, whether or not the page with the information validates or
not and is XHTML or HTML has no bearing on the quality and usefulness
of the information.
Obviously you felt strongly enough to post the full text, not just a
link. Yet you don't follow your own convictions.
priorities vs. time

A developer who spends time twiddling the knobs of his own blog for
free when he should be writing quality software for money, spending
time with family and friends, and climbing rocks could be considered
crazy :)

Peter

Apr 22 '07 #22

P: n/a
On 21 Apr 2007 21:33:35 -0700, in comp.lang.javascript Peter Michaux
<pe**********@gmail.com>
<11**********************@n59g2000hsh.googlegroups .comwrote:
>| Hi Jeff,
|
| | That's a pretty poor excuse for "do as I say, not as I do".
| |
| | I don't think so. Just because one knows how to do something it
| | doesn't mean one cares enough about blog software to spend time fixing
| | it.
| >
| You copied/pasted (with permission) the article from another site.
|
| That article doesn't appear on my blog.
My apologies - you gave the impression it was. "One day I will
get around to fixing my blog software which also stupidly uses XHTML."
>| Regardless, whether or not the page with the information validates or
| not and is XHTML or HTML has no bearing on the quality and usefulness
| of the information.
|
| Obviously you felt strongly enough to post the full text, not just a
| link. Yet you don't follow your own convictions.
|
| priorities vs. time
|
| A developer who spends time twiddling the knobs of his own blog for
| free when he should be writing quality software for money, spending
| time with family and friends, and climbing rocks could be considered
| crazy :)
It only takes a second or so to check a doctype! Not difficult to do
or time consuming to change.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 22 '07 #23

P: n/a
On Apr 22, 6:05 am, Jeff North <jnort...@yahoo.com.auwrote:
On 21 Apr 2007 21:33:35 -0700, in comp.lang.javascript Peter Michaux
| priorities vs. time
|
| A developer who spends time twiddling the knobs of his own blog for
| free when he should be writing quality software for money, spending
| time with family and friends, and climbing rocks could be considered
| crazy :)

It only takes a second or so to check a doctype! Not difficult to do
or time consuming to change.
There is quite a bit more involved to changing from XHTML to HTML then
just changing the doctype. Various tags have to be closed different
ways.

Peter

Apr 22 '07 #24

This discussion thread is closed

Replies have been disabled for this discussion.