Re: Newbie Question on the Basics



On Aug 17, 5:06 pm, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:
David Golightly wrote:
On Aug 17, 12:00 pm, Vik Rubenfeld <v...@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
1) I don't see anything in the HTML that calls the JavaScript. What is
it in the HTML that calls the Javascript?

2) Autocomplete has to work by calling a function after every keypress.
What is it in the HTML that calls the Javascript after every keypress?

You're looking at an example of "unobtrusive scripting". The idea
here is that the HTML doesn't have to call the JavaScript - the JS is
perfectly capable of initializing itself. The "window.onload" sets
the window's "onload" property to a function that gets called when the
"load" event is fired, typically when the browser is done loading and
rendering the page and any dependent files (images, etc.). The
"onload" function then uses the DOM to locate nodes in the document
and, again using the DOM, attach event handlers to them, including
"onkeypress". This is a newer and not yet ubiquitous technique,

In fact, it is based on an now-obsolete approach, originating from Netscape 2.0.

and while some feel that it's controversial (which, I suppose, makes it
controversial, no?), is generally accepted as a best practice for
making pages that degrade gracefully

It is not at all a means of graceful degradation.


This isn't an argument. It's just contradiction! (--Monty Python)

.



Relevant Pages

  • Re: JS, DOM and tr... IE problems!
    ... I've got a problem with javascript and DOM. ... Capitalisation is often used in HTML markup, ... If you post what your browser is actually getting (e.g. using view ...
    (comp.lang.javascript)
  • Re: Why doesnt IE show full html source?
    ... if you use smart navigation, javascript changes the dom on the fly, so the ... in turn is generated by javascript - for which you can see the source). ... need to use a dom inspector to see the changes made by smart nav. ... | Why does IE not show the full html source when I try to view the source?? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Intrepreting Javascript within C#
    ... Right, and using MSHTML, you would load the page, and then your bot ... DOM to get whatever elements were changed to have the new URL. ... If this is in the context of an HTML page, then why not use an HTML ... document host like MSHTML to execute the javascript? ...
    (microsoft.public.dotnet.languages.csharp)
  • Security holes in Hotmail, Yahoo, and other webmails
    ... Most webmails services and applications have huge security holes on the ... execution of malicious javascript and HTML code ... some parts of the user's mailbox, without use of javascript. ... Cross-site scripting vulnerabilities on the yahoo.com domain was reported ...
    (Vuln-Dev)
  • Re: HTML4.01 STRICT and hyperlinks with target
    ... new window *in HTML* instead of in JavaScript. ... have a link open a new window in HTML instead of in JavaScript. ... I know this is not a great reason, but I think it is reason ...
    (comp.infosystems.www.authoring.html)

Loading