Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Javascript / HTML Standard Question

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Related Topics:
Replacing Javascript with PHP to write HTML - I've got a situation that I need to fix, but I don't know how and I don't know what I'm looking for is called. I was hoping someone here can help. I have a site that is basically set up like this: HEADER MENU MAIN CONTENT ..

Javascript Question - Would someone have a snippet of code that would allow me to do the same thing seen on On this page, is a main picture, below it is 3 more. If you place your mouse over one of the..

JavaScript Question - I was told that all I had to do was to include the following line of code in a web page to cause timely to magically appear. I have added that line in the body of a web page, but nothing shows up, even after I refresh the page.

javascript question - i have a quiz that uses frames and i don't know how to score my quiz. my quiz answers are on one frame and the questions are on another. my quiz has multiple choice and fill in the blank questions as well as check boxes and radio buttons can anyone help..

javascript question - i have a quiz that uses frames and i don't know how to score my quiz. my quiz answers are on one frame and the questions are on another. my quiz has multiple choice and fill in the blank questions as well as check boxes and radio buttons can anyone help..
Author Message
TS Moderator

External


Since: Aug 13, 2006
Posts: 67



(Msg. 1) Posted: Wed Oct 11, 2006 4:33 pm
Post subject: Javascript / HTML Standard Question
Archived from groups: alt>www>webmaster (more info?)

What standard talks ommouseover returning "true" or "false" and how it
affects subsequent processing of the <a> element?

 >> Stay informed about: Javascript / HTML Standard Question 
Back to top
Login to vote
TS Moderator

External


Since: Aug 13, 2006
Posts: 67



(Msg. 2) Posted: Wed Oct 11, 2006 5:04 pm
Post subject: Re: Javascript / HTML Standard Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

TS Moderator wrote:
> What standard talks ommouseover returning "true" or "false" and how it
> affects subsequent processing of the <a> element?

sorry, I am talking about something like this: <a
href="/images/image2.jpg" onclick="changeImg(this.href); return false;">

 >> Stay informed about: Javascript / HTML Standard Question 
Back to top
Login to vote
spamblocked1

External


Since: Sep 19, 2003
Posts: 3499



(Msg. 3) Posted: Thu Oct 12, 2006 1:20 am
Post subject: Re: Javascript / HTML Standard Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Fleeing from the madness of the http://groups.google.com jungle
TS Moderator <TruckSafety.DeleteThis@gmail.com> stumbled into news:alt.www.webmaster
and said:

>
> TS Moderator wrote:
>> What standard talks ommouseover returning "true" or "false" and how it
>> affects subsequent processing of the <a> element?
>
> sorry, I am talking about something like this: <a
> href="/images/image2.jpg" onclick="changeImg(this.href); return false;">

Can't help you with 'standards' refs - try ... news:comp.lang.javascript

perhaps the examples here help?

http://williamtasso.com/tech/poptest.html

could be issues - that's a very old page.

--
William Tasso

http://williamtasso.com/words/what-is-usenet.asp
 >> Stay informed about: Javascript / HTML Standard Question 
Back to top
Login to vote
David Hennessy

External


Since: Oct 12, 2007
Posts: 37



(Msg. 4) Posted: Thu Oct 12, 2006 3:39 am
Post subject: Re: Javascript / HTML Standard Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

TS Moderator wrote:
> TS Moderator wrote:
>> What standard talks ommouseover returning "true" or "false" and how it
>> affects subsequent processing of the <a> element?
>
> sorry, I am talking about something like this: <a
> href="/images/image2.jpg" onclick="changeImg(this.href); return false;">
>

I'm not sure about "standards," but in my experience, this would mean:

IF the user had JavaScript enabled, when they clicked, the changeImg
function would be run, with the href information passed to the function
("/images/image2.jpg"). The function would do whatever its gonna do. The
"return false" part would keep that mouseclick from actually activating
the link, so the user would not get sent to "/images/image2.jpg" --
unless, of course, the function changeImg sends him.

IF the user does NOT have JavaScript enabled, then clicking the link
would take the user straight to "/images/image2.jpg". The user would not
pass Go, and would not collect $200.

--
David J. Hennessy
http://maidix.com/
http://davidhennessy.net/
 >> Stay informed about: Javascript / HTML Standard Question 
Back to top
Login to vote
Andy Dingley

External


Since: Mar 24, 2006
Posts: 248



(Msg. 5) Posted: Thu Oct 12, 2006 4:27 am
Post subject: Re: Javascript / HTML Standard Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

TS Moderator wrote:

> What standard talks ommouseover returning "true" or "false" and how it
> affects subsequent processing of the <a> element?

These are "DOM events", so their general behaviour is described in the
DOM standard.

In particular the concept of "event cancellation" is described in
general terms
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-cancelation

It doesn't talk about what happens when you cancel an event, it talks
vaguely about what doesn't happen, and even then it only says that "the
default action no longer happens". It certainly doesn't (correctly) try
to state _what_ this default action would have been. I'm not sure where
you'd even find any definition of what such a default action for a HTML
object would be -- it's even browser dependent, not standards based.

You might also notice that this standard for W3C DOM Level 2 bears
little relation to most live code! It talks about calling a
preventDefault() function to cancel events, when the usual approach is
to return false. This function return approach works fine, and it's the
DOM Level 0 definition put forward by Netscape somewhere back in the
mists of time. I don't have a good reference link for this, it's so
long ago.

In general, returning function values as false is simple and works
fine. The Level 2 approach is better because of another new feature it
added, that of registering multiple event handlers to a single event.
This is very useful when you start looking at window onload and similar
events, where you might have many event handlers all wanting a piece of
the action. It's too awkward to coordinate their function returns, so
the easiest approach is to use the preventDefault() function whenever
you need it (quite possibly more than once).
 >> Stay informed about: Javascript / HTML Standard Question 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]