From: | Matt Sealey |
Date: | 12 Mar 2001 at 22:46:46 |
Subject: | Re: Javascript Does'nt work on my amiga ??? |
Hello Neil
On 12-Mar-01, you wrote:
> Nick Knight said,
>
>> What I'm actually trying to do is get a message come up in a
>> window with the option to click on ' ok 'when I go to
>> a web page.
>
> That sounds incredibly annoying, but it you must do it try calling the
> alert() from the page's onLoad handler.
>
> The script you posted had more errors than lines. You've defined the
> function as a method of the heading tag. How can a piece of text have an
> onClick handler? Only links have those.
Nearly all objects on the page that can be enclosed in tags have onClick
handlers.
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onclick.asp
> You haven't called the function anywhere
By specifying the object id, and the name of the handler (onclick) he is in
fact attaching that code, to that handler, on that object. It's perfectly
good Javascript.
> and there are no comments to prevent non-JS browsers displaying the
> contents of the script.
Like that matters :)
> I'd suggest thinking through what you want to do more clearly, and then
> reading some books or tutorials on JavaScript to determine the best way
> to do it.
I suggest you quit taking Netscape 4.7's word for the scope of Javascript these
days, and read up on the documentation for NS6 and IE5.5 ;)
Thanks
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
Make good on the promise you made at graduation to keep
in touch. Classmates.com has over 14 million registered
high school alumni--chances are you'll find your friends!
http://us.click.yahoo.com/l3joGB/DMUCAA/4ihDAA/d8AVlB/TM
---------------------------------------------------------------------_->
Quote carefully and read all ADMIN:README mails
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/