Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #12494 > unrolled thread
| Started by | "Larry.Martell@gmail.com" <larry.martell@gmail.com> |
|---|---|
| First post | 2012-03-08 06:51 -0800 |
| Last post | 2012-03-08 17:03 +0000 |
| Articles | 20 on this page of 59 — 17 participants |
Back to article view | Back to comp.lang.javascript
Super basic newbie question "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-08 06:51 -0800
Re: Super basic newbie question Martin Honnen <mahotrash@yahoo.de> - 2012-03-08 16:04 +0100
Re: Super basic newbie question "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-08 09:15 -0800
Re: Super basic newbie question Mike Duffy <never@you.mind.com> - 2012-03-09 01:01 +0000
Re: Super basic newbie question "Tom de Neef" <tdeneef@qolor.nl> - 2012-03-08 16:08 +0100
Re: Super basic newbie question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-09 04:05 +0100
Re: Super basic newbie question "Tom de Neef" <tdeneef@qolor.nl> - 2012-03-09 10:47 +0100
Re: Super basic newbie question SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-08 16:10 +0100
Re: Super basic newbie question "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-08 09:15 -0800
Re: Super basic newbie question Dr J R Stockton <reply1210@merlyn.demon.co.uk> - 2012-03-09 21:39 +0000
Re: Super basic newbie question SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-10 09:55 +0100
Re: Super basic newbie question Swifty <steve.j.swift@gmail.com> - 2012-03-10 18:19 +0000
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-10 21:59 +0000
Re: Super basic newbie question Swifty <steve.j.swift@gmail.com> - 2012-03-12 09:58 +0000
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-12 10:02 +0000
Re: Super basic newbie question Swifty <steve.j.swift@gmail.com> - 2012-03-12 10:57 +0000
Re: Super basic newbie question John G Harris <john@nospam.demon.co.uk> - 2012-03-12 15:39 +0000
Re: Super basic newbie question John G Harris <john@nospam.demon.co.uk> - 2012-03-12 15:37 +0000
Re: Super basic newbie question Swifty <steve.j.swift@gmail.com> - 2012-03-13 10:34 +0000
Re: Super basic newbie question "Mel Smith" <med_cutout_syntel@aol.com> - 2012-03-13 10:12 -0600
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-13 19:44 +0000
Re: Super basic newbie question Gene Wirchenko <genew@ocis.net> - 2012-03-13 19:50 -0700
Re: Super basic newbie question Gene Wirchenko <genew@ocis.net> - 2012-03-13 08:58 -0700
Re: Super basic newbie question SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-11 00:04 +0100
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-10 23:16 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 16:41 -0700
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-13 19:46 +0000
Re: Super basic newbie question Dr J R Stockton <reply1211@merlyn.demon.co.uk.not.invalid> - 2012-03-14 21:01 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-14 17:18 -0700
Re: Super basic newbie question John G Harris <john@nospam.demon.co.uk> - 2012-03-15 20:16 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-15 14:36 -0700
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-15 23:41 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-15 16:49 -0700
Re: Super basic newbie question John G Harris <john@nospam.demon.co.uk> - 2012-03-16 16:55 +0000
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-16 18:09 +0000
Re: Super basic newbie question Dr J R Stockton <reply1211@merlyn.demon.co.uk.not.invalid> - 2012-03-16 19:47 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-16 18:27 -0700
Re: Super basic newbie question Dr J R Stockton <reply1211@merlyn.demon.co.uk.not.invalid> - 2012-03-18 19:27 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-18 16:55 -0700
Re: Super basic newbie question Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-03-17 11:35 +0100
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-17 09:42 -0700
Re: Super basic newbie question Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-03-18 01:33 +0100
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-17 17:46 -0700
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-17 19:45 -0700
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-15 10:00 +0000
Re: Super basic newbie question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-17 14:53 +0100
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-17 12:43 -0700
Re: Super basic newbie question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-17 23:39 +0100
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-17 15:54 -0700
Re: Super basic newbie question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-18 10:48 +0100
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-18 04:06 -0700
Re: Super basic newbie question Tim Streater <timstreater@greenbee.net> - 2012-03-18 13:52 +0000
Re: Super basic newbie question David Mark <dmark.cinsoft@gmail.com> - 2012-03-18 12:10 -0700
Re: Super basic newbie question Dr J R Stockton <reply1210@merlyn.demon.co.uk> - 2012-03-11 19:02 +0000
Re: Super basic newbie question "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-08 17:17 +0200
Re: Super basic newbie question "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-08 09:17 -0800
Re: Super basic newbie question Gene Wirchenko <genew@ocis.net> - 2012-03-08 08:44 -0800
Re: Super basic newbie question "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-08 09:24 -0800
Re: Super basic newbie question Denis McMahon <denismfmcmahon@gmail.com> - 2012-03-08 17:03 +0000
Page 1 of 3 [1] 2 3 Next page →
| From | "Larry.Martell@gmail.com" <larry.martell@gmail.com> |
|---|---|
| Date | 2012-03-08 06:51 -0800 |
| Subject | Super basic newbie question |
| Message-ID | <aaa3f536-d041-47fd-9c0c-2b158d5b82ee@x7g2000pbi.googlegroups.com> |
Just getting started in javascript. This is my very first script.
I have a very simple web page with a text entry field:
<input type="text" id='filterValue" size=20>
In my javascript function I want to get each keystroke from that
field, and write it out. So I have:
window.onload = function() {
document.getElementById("filterValue").onkeypress = function() {
var val = document.getElementById("filterValue").value;
document.write("<p>" + val + "</p>");
}
}
But when I load the page I get this in the web console:
[07:12:13.071] document.getElementById("filterValue") is null
If I display the page source, I see the field with the matching id:
<input type="text" id='filterValue" size=20>
Why is it not being found? What am I doing wrong here?
TIA!
-larry
[toc] | [next] | [standalone]
| From | Martin Honnen <mahotrash@yahoo.de> |
|---|---|
| Date | 2012-03-08 16:04 +0100 |
| Message-ID | <4f58ca7e$0$6567$9b4e6d93@newsspool3.arcor-online.net> |
| In reply to | #12494 |
Larry.Martell@gmail.com wrote:
> Just getting started in javascript. This is my very first script.
>
> I have a very simple web page with a text entry field:
>
> <input type="text" id='filterValue" size=20>
>
> In my javascript function I want to get each keystroke from that
> field, and write it out. So I have:
>
> window.onload = function() {
> document.getElementById("filterValue").onkeypress = function() {
> var val = document.getElementById("filterValue").value;
> document.write("<p>" + val +"</p>");
Forget about document.write unless you want to use it during page load
or unless you want to completely overwrite the loaded page after page load.
After page load, to create new nodes and insert them use e.g
var p = document.createElement('p');
p.appendChild(document.createTextNode(val));
document.body.appendChild(p);
where obviously document.body is meant as an example, you can instead
select some other target parent element for the newly created 'p'
element and appendChild it there.
--
Martin Honnen --- MVP Data Platform Development
http://msmvps.com/blogs/martin_honnen/
[toc] | [prev] | [next] | [standalone]
| From | "Larry.Martell@gmail.com" <larry.martell@gmail.com> |
|---|---|
| Date | 2012-03-08 09:15 -0800 |
| Message-ID | <9a3cb25a-9440-469a-9fc5-5d3cc70ebc7a@p6g2000yqi.googlegroups.com> |
| In reply to | #12496 |
On Mar 8, 8:04 am, Martin Honnen <mahotr...@yahoo.de> wrote:
> Larry.Mart...@gmail.com wrote:
> > Just getting started in javascript. This is my very first script.
>
> > I have a very simple web page with a text entry field:
>
> > <input type="text" id='filterValue" size=20>
>
> > In my javascript function I want to get each keystroke from that
> > field, and write it out. So I have:
>
> > window.onload = function() {
> > document.getElementById("filterValue").onkeypress = function() {
> > var val = document.getElementById("filterValue").value;
> > document.write("<p>" + val +"</p>");
>
> Forget about document.write unless you want to use it during page load
> or unless you want to completely overwrite the loaded page after page load.
> After page load, to create new nodes and insert them use e.g
> var p = document.createElement('p');
> p.appendChild(document.createTextNode(val));
> document.body.appendChild(p);
> where obviously document.body is meant as an example, you can instead
> select some other target parent element for the newly created 'p'
> element and appendChild it there.
http://msmvps.com/blogs/martin_honnen/
The document.write was just a test to see if my function was being
called and was working. You totally missed the point of my issue,
which was that getElementById was returning null.
[toc] | [prev] | [next] | [standalone]
| From | Mike Duffy <never@you.mind.com> |
|---|---|
| Date | 2012-03-09 01:01 +0000 |
| Message-ID | <XnsA010CBC677350nevermind@94.75.214.39> |
| In reply to | #12505 |
"Larry.Martell@gmail.com" <larry.martell@gmail.com> wrote in news:9a3cb25a-9440-469a-9fc5-5d3cc70ebc7a@p6g2000yqi.googlegroups.com: > The document.write was just a test to see if my function was being > called and was working. You totally missed the point of my issue, > which was that getElementById was returning null. Perhaps you totally missed the point of his issue, which is that "document.write", depending on when it is executed, can mess up the entire document, thus making getElementById return null because the corresponding element has just been destroyed by the "document.write". If what he suggested seems to complicated, use named span elements, and modify their values using "innerHTML". Alternatively, define a separate text box above your test field, and append values to it as a sort of message log. -- http://pages.videotron.ca/duffym/index.htm#
[toc] | [prev] | [next] | [standalone]
| From | "Tom de Neef" <tdeneef@qolor.nl> |
|---|---|
| Date | 2012-03-08 16:08 +0100 |
| Message-ID | <4f58cb5b$0$6987$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #12494 |
"Larry.Martell@gmail.com" <larry.martell@gmail.com> schreef in bericht
news:aaa3f536-d041-47fd-9c0c-2b158d5b82ee@x7g2000pbi.googlegroups.com...
> Just getting started in javascript. This is my very first script.
>
> I have a very simple web page with a text entry field:
>
> <input type="text" id='filterValue" size=20>
>
> In my javascript function I want to get each keystroke from that
> field, and write it out. So I have:
>
> window.onload = function() {
> document.getElementById("filterValue").onkeypress = function() {
> var val = document.getElementById("filterValue").value;
> document.write("<p>" + val + "</p>");
> }
> }
>
I am a newby myself, so I may easily be corrected.
Check out document.write. It will create a new execution context. Thus you
loose everything you thought you had declared.
Also check 'this'. Within the onkeypress function you ought to be able to
refer to the control that handled the event via .this.
Tom
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-03-09 04:05 +0100 |
| Message-ID | <1982352.3pIkI1WyPu@PointedEars.de> |
| In reply to | #12497 |
Tom de Neef wrote:
> "Larry.Martell@gmail.com" […]
>> Just getting started in javascript. This is my very first script.
>>
>> I have a very simple web page with a text entry field:
>>
>> <input type="text" id='filterValue" size=20>
>>
>> In my javascript function I want to get each keystroke from that
>> field, and write it out. So I have:
>>
>> window.onload = function() {
>> document.getElementById("filterValue").onkeypress = function() {
>> var val = document.getElementById("filterValue").value;
>> document.write("<p>" + val + "</p>");
>> }
>> }
>
> I am a newby myself, so I may easily be corrected.
> Check out document.write.
Did you mean "remove"? "(To) check out" is colloquial for "(to) look into"
or "(to) retrieve" (with version control systems) instead.
> It will create a new execution context.
No, it will not. A new execution context can only be created with a
function and, in a browser environment, a new view (e.g., tab or window).
> Thus you loose everything you thought you had declared.
^^^^^
([to] _lose_ – lost – lost. "(to) loose" something means to untie something
instead.)
What you probably meant to say is that if document.write() is called after
the document has been loaded, and the output stream has been closed, it
opens a new output stream (as if by document.open(), see W3C DOM Level 2
HTML) and overwrites the existing document tree, which often causes the
previously existing global script execution context to be at least partially
deconstructed by the user agent. (There is no public standard to specify a
proper behavior, and it varies, which is why this should be avoided.)
In this case, the event listener that calls document.write() is being
added/defined after the window has been loaded (thanks to `window.onload'),
which often suggests that the document in the window has been loaded, too.
So the call to document.write() is bound to happen after the document has
been loaded.
The solution is to use other DOM manipulation methods instead. It may be
contained in nor referred to by the FAQ of this newsgroup, which one should
always consult before asking a question here.
> Also check 'this'. Within the onkeypress function you ought to be able to
> refer to the control that handled the event via .this.
Correct.
PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>
[toc] | [prev] | [next] | [standalone]
| From | "Tom de Neef" <tdeneef@qolor.nl> |
|---|---|
| Date | 2012-03-09 10:47 +0100 |
| Message-ID | <4f59d19f$0$6928$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #12517 |
"Thomas 'PointedEars' Lahn" <PointedEars@web.de> >> I am a newby myself, so I may easily be corrected. >> Check out document.write. > > Did you mean "remove"? "(To) check out" is colloquial for "(to) look > into" > or "(to) retrieve" (with version control systems) instead. > ;-) I must have been at a hotel counter. I meant: see what you can find out about... >> It will create a new execution context. > > What you probably meant to say > is that if document.write() is called after > the document has been loaded, and the output stream has been closed, it > opens a new output stream (as if by document.open(), see W3C DOM Level 2 > HTML) and overwrites the existing document tree, which often causes the > previously existing global script execution context to be at least > partially > deconstructed by the user agent. (There is no public standard to specify > a > proper behavior, and it varies, which is why this should be avoided.) > I couldn't have said it better. Always like your comments. Tom
[toc] | [prev] | [next] | [standalone]
| From | SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> |
|---|---|
| Date | 2012-03-08 16:10 +0100 |
| Message-ID | <4f58cbd4$0$21489$ba4acef3@reader.news.orange.fr> |
| In reply to | #12494 |
Le 08/03/12 15:51, Larry.Martell@gmail.com a écrit : > If I display the page source, I see the field with the matching id: > > <input type="text" id='filterValue" size=20> > > Why is it not being found? What am I doing wrong here? your html is wrong, maybe better with : <input type="text" id="filterValue" size=20> error : 'blah" (with ' and ") use: ' and ' or: " and " -- Stéphane Moriaux avec/with iMac-intel
[toc] | [prev] | [next] | [standalone]
| From | "Larry.Martell@gmail.com" <larry.martell@gmail.com> |
|---|---|
| Date | 2012-03-08 09:15 -0800 |
| Message-ID | <5049dd4e-dcc9-4ea4-8ea1-633cb5f8ed0b@i16g2000yql.googlegroups.com> |
| In reply to | #12498 |
On Mar 8, 8:10 am, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid> wrote: > Le 08/03/12 15:51, Larry.Mart...@gmail.com a écrit : > > > If I display the page source, I see the field with the matching id: > > > <input type="text" id='filterValue" size=20> > > > Why is it not being found? What am I doing wrong here? > > your html is wrong, > maybe better with : > > <input type="text" id="filterValue" size=20> > > error : 'blah" (with ' and ") > > use: ' and ' > or: " and " Yes, that was the problem. Thanks. That's what I get for coding at 4am.
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1210@merlyn.demon.co.uk> |
|---|---|
| Date | 2012-03-09 21:39 +0000 |
| Message-ID | <4Uwh8GHjinWPFwBf@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #12504 |
In comp.lang.javascript message <5049dd4e-dcc9-4ea4-8ea1-633cb5f8ed0b@i1 6g2000yql.googlegroups.com>, Thu, 8 Mar 2012 09:15:59, "Larry.Martell@gmail.com" <larry.martell@gmail.com> posted: >On Mar 8, 8:10 am, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid> >wrote: >> Le 08/03/12 15:51, Larry.Mart...@gmail.com a écrit : >> > <input type="text" id='filterValue" size=20> >Yes, that was the problem. Thanks. That's what I get for coding at >4am. My rule, easy for me to remember, is that quotes are unnecessary around attributes which contain only alpha-numeric characters; otherwise, they may be necessary. If quotes are not used when they are not necessary, they can cause no problems there. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links; Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc. No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
[toc] | [prev] | [next] | [standalone]
| From | SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> |
|---|---|
| Date | 2012-03-10 09:55 +0100 |
| Message-ID | <4f5b170a$0$12497$ba4acef3@reader.news.orange.fr> |
| In reply to | #12558 |
Le 09/03/12 22:39, Dr J R Stockton a écrit : >>> Le 08/03/12 15:51, Larry.Mart...@gmail.com a écrit : > >>>> <input type="text" id='filterValue" size=20> > >> Yes, that was the problem. Thanks. That's what I get for coding at >> 4am. > > My rule, easy for me to remember, is that quotes are unnecessary around > attributes which contain only alpha-numeric characters; doesn't it depend of the doctype ? -- Stéphane Moriaux avec/with iMac-intel
[toc] | [prev] | [next] | [standalone]
| From | Swifty <steve.j.swift@gmail.com> |
|---|---|
| Date | 2012-03-10 18:19 +0000 |
| Message-ID | <6h6nl7p2ekpjoq90fotvrq909ifj0752lj@4ax.com> |
| In reply to | #12568 |
On Sat, 10 Mar 2012 09:55:38 +0100, SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> wrote: >doesn't it depend of the doctype ? No, the quotes around attribute values have always been optional when the value contains no spaces. There may be other conditions when the quotes are required, but I have no experience of such conditions. Since I started remote access when the fastest communication was the 220 baud modem, I never send 100 characters when I can get away with sending 98, so I omit all of the optional stuff, and I've only recently adopted the use of doctype. I'll admit that I'd anticipate possible problems if the values contained anything other than alphanumeric characters. -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-03-10 21:59 +0000 |
| Message-ID | <timstreater-BDEF13.21590710032012@news.individual.net> |
| In reply to | #12577 |
In article <6h6nl7p2ekpjoq90fotvrq909ifj0752lj@4ax.com>, Swifty <steve.j.swift@gmail.com> wrote: > Since I started remote access when the fastest communication was the > 220 baud modem, I never send 100 characters when I can get away with > sending 98, so I omit all of the optional stuff, and I've only > recently adopted the use of doctype. Not using the doctype is definitely a case of cutting off your nose to spite your face. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | Swifty <steve.j.swift@gmail.com> |
|---|---|
| Date | 2012-03-12 09:58 +0000 |
| Message-ID | <6lhrl7psq2hvtjd88sf2d8vin63un9pcps@4ax.com> |
| In reply to | #12579 |
On Sat, 10 Mar 2012 21:59:07 +0000, Tim Streater <timstreater@greenbee.net> wrote: >Not using the doctype is definitely a case of cutting off your nose to >spite your face I'm not actively not using doctype. I predate doctype by many years, so most of my pages started without one, and I've found no need to add one. Most of my HTML is so simple that the doctype makes little, or no difference. At the end of each year, I have to justify what I've been doing to my manager. He's unlikely to get excited by "I changed a few thousand webpages to be syntactically correct; you cannot see any difference". However, "I wrote a process which should bring in an extra £1million per year, but cut some corners along the way" would have him beaming (on both counts). Incidentally, these are real life examples. -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-03-12 10:02 +0000 |
| Message-ID | <timstreater-A824CA.10024712032012@news.individual.net> |
| In reply to | #12608 |
In article <6lhrl7psq2hvtjd88sf2d8vin63un9pcps@4ax.com>, Swifty <steve.j.swift@gmail.com> wrote: > On Sat, 10 Mar 2012 21:59:07 +0000, Tim Streater > <timstreater@greenbee.net> wrote: > > >Not using the doctype is definitely a case of cutting off your nose to > >spite your face > > I'm not actively not using doctype. I predate doctype by many years, > so most of my pages started without one, and I've found no need to add > one. > > Most of my HTML is so simple that the doctype makes little, or no > difference. > > At the end of each year, I have to justify what I've been doing to my > manager. He's unlikely to get excited by "I changed a few thousand > webpages to be syntactically correct; you cannot see any difference". > > However, "I wrote a process which should bring in an extra £1million > per year, but cut some corners along the way" would have him beaming > (on both counts). > > Incidentally, these are real life examples. Doubtless. But I would suggest that you put: <!DOCTYPE html> in all your new pages. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | Swifty <steve.j.swift@gmail.com> |
|---|---|
| Date | 2012-03-12 10:57 +0000 |
| Message-ID | <mglrl7pg8rq2dt5c2pqev1aja4n9vbksul@4ax.com> |
| In reply to | #12610 |
On Mon, 12 Mar 2012 10:02:47 +0000, Tim Streater <timstreater@greenbee.net> wrote: >I would suggest that you put: > > <!DOCTYPE html> > >in all your new pages I do, or more accurately, my process does. 99% of my pages are created by CGI scripts, so fixing those was simple; add the <!DOCTYPE> tag to the subroutine that builds the HTTP header. -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <john@nospam.demon.co.uk> |
|---|---|
| Date | 2012-03-12 15:39 +0000 |
| Message-ID | <R2rifFFCjhXPFwO$@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| In reply to | #12610 |
On Mon, 12 Mar 2012 at 10:02:47, in comp.lang.javascript, Tim Streater wrote: <snip> >Doubtless. But I would suggest that you put: > > <!DOCTYPE html> > >in all your new pages. That's HTML 5. Did you mean it? John -- John Harris
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <john@nospam.demon.co.uk> |
|---|---|
| Date | 2012-03-12 15:37 +0000 |
| Message-ID | <EW2nHeE0ghXPFwuW@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| In reply to | #12608 |
On Mon, 12 Mar 2012 at 09:58:25, in comp.lang.javascript, Swifty wrote: >On Sat, 10 Mar 2012 21:59:07 +0000, Tim Streater ><timstreater@greenbee.net> wrote: > >>Not using the doctype is definitely a case of cutting off your nose to >>spite your face > >I'm not actively not using doctype. I predate doctype by many years, >so most of my pages started without one, and I've found no need to add >one. <snip> You must be very old. Even HTML 2 had doctype declarations. In HTML 3.2 they were mandatory. John -- John Harris
[toc] | [prev] | [next] | [standalone]
| From | Swifty <steve.j.swift@gmail.com> |
|---|---|
| Date | 2012-03-13 10:34 +0000 |
| Message-ID | <dh8ul7hnbm0s9pf65au0i01d5kapbomrc9@4ax.com> |
| In reply to | #12614 |
On Mon, 12 Mar 2012 15:37:24 +0000, John G Harris <john@nospam.demon.co.uk> wrote: >You must be very old. I was in IT before TCP/IP was invented. I remember remarking that I saw no future for it. I've made worse mistakes. -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-03-13 10:12 -0600 |
| Message-ID | <9s9a04F48bU1@mid.individual.net> |
| In reply to | #12640 |
Swifty said:
">
> I was in IT before TCP/IP was invented. I remember remarking that I
> saw no future for it. I've made worse mistakes.
Sify:
I made the biggest mistake of my life:
I was a member of a 2-man IT team (the other guy was Dan McCormack) that
was sent to Provo, Utah in the early '80s to investigate a small company
that needed $1 million 'seed' money to carry on with development of their
new networking technology.
In their small building, I witnessed a guy getting 'smashed' from a
bottle of booze in his desk drawer. In another we watched as a guy tried to
connect two 'micro computer' boards and show us how he could transmit
messages thru his basic new network technology. The boards were about ten
feet apart, and several wires were floating in the air above and near us
between the boards. The test failed and the guy got very flustered.
This was very unsettling; and then there was a final meeting that day
between us and one of their top executives. He was very nervous, and really
wanted us to recommend that his company get the $1 million seed money. This
would give our Canadian Company (Altel Data), a 25% stake in the new
company.
So, Dan & I reurned to Canada, and I wrote up a paper for our Canadian
managers that strongly recommended that we *not* invest in this scary U.S.
startup. So, my managers accepted my negative recommendation.
This company later turned out to be Novell !!
It later turned out that I left Altel Data (to go on my own), and Altel
Data itself was collapsed due to the emergence of microcomputers, and the
collapse of minicomputers (we had sold Vax and PDP minis before then).
-Mel Smith
(Loser-at-Large)
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web