HighDots Forums  

Re: onSubmit="A whole bunch of headaches"

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: onSubmit="A whole bunch of headaches" in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Robert
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-14-2004 , 03:39 PM






In article <w81fc.109534$Ig.1719@pd7tw2no>,
Reply Via Newsgroup <reply-to-newsgroup (AT) please (DOT) com> wrote:

Quote:
Simple but don't beat yourself over the head about it... It took me a
few minutes before I picked it up...

best of luck
randelld
It took me a while to find it too.

My coding style is to always copy the script tags.

I wonder why you do not get some error message?

Robert


Reply With Quote
  #2  
Old   
Richard Cornford
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-14-2004 , 05:22 PM






Robert wrote:
<snip>
Quote:
I wonder why you do not get some error message?
Because the browser's reaction to being presented with script tags
specifying a script language that it doesn't understand/implement is not
to attempt to execute it (it cannot decide that text/javscript isn't a
real script language, because it might be). And a script that is never
run cannot error.

Richard.




Reply With Quote
  #3  
Old   
Reply Via Newsgroup
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-14-2004 , 08:07 PM



Richard Cornford wrote:

Quote:
Robert wrote:
snip

I wonder why you do not get some error message?


Because the browser's reaction to being presented with script tags
specifying a script language that it doesn't understand/implement is not
to attempt to execute it (it cannot decide that text/javscript isn't a
real script language, because it might be). And a script that is never
run cannot error.

Richard.


But it did error - One gets "Object Expected"...

Is it a 'feature' of javascript?

randelld


Reply With Quote
  #4  
Old   
Richard Cornford
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-14-2004 , 09:08 PM



Reply Via Newsgroup wrote:
<snip>
Quote:
But it did error - One gets "Object Expected"...

Is it a 'feature' of javascript?
The event handling attribute function errored because it could not find
the function that it was trying to call (because it had been specified
in an unknown scripting language and so not instantiated). The event
handling attribute code is not influenced by the type attribute
assignments of any script elements (except on IE, where they default to
the language of the first script element encountered, or JScript if
there is no separate script element, though the W3C have a different
idea about how the language for intrinsic events should be defaulted).

Richard.




Reply With Quote
  #5  
Old   
Robert
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-16-2004 , 03:16 PM




Quote:
Because the browser's reaction to being presented with script tags
specifying a script language that it doesn't understand/implement is not
to attempt to execute it (it cannot decide that text/javscript isn't a
real script language, because it might be).
Couldn't is say it doesn't have an interpreter or plugin for javscript?

Robert


Reply With Quote
  #6  
Old   
Richard Cornford
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-16-2004 , 04:49 PM



Robert wrote:
Quote:
Because the browser's reaction to being presented with script tags
specifying a script language that it doesn't understand/implement is
not to attempt to execute it (it cannot decide that text/javscript
isn't a real script language, because it might be).

Couldn't is say it doesn't have an interpreter or plugin for
javscript?
Would you really want to be told every time you loaded a page that
contained any VBScript? Would such a warning provide any value to the
bulk of browser users?

Scripting is supposed to be an optional extra, and possible in any
language (though nobody seems interested in implementing any language
but ECMAScirpt, except Microsoft) so quietly ignoring anything that
cannot be used is the logical (and specified) reaction.

Richard.




Reply With Quote
  #7  
Old   
Jim Ley
 
Posts: n/a

Default Re: onSubmit="A whole bunch of headaches" - 04-17-2004 , 12:36 PM



On Thu, 15 Apr 2004 02:08:07 +0100, "Richard Cornford"
<Richard (AT) litotes (DOT) demon.co.uk> wrote:

Quote:
though the W3C have a different
idea about how the language for intrinsic events should be defaulted).
but it didn't have 2 independant implementations when it went to REC,
is badly specified*, so I think we should ignore it, avoiding all
intrinsic events would be better than using that awful hack.

Jim.

* Meaning of course that it should never have got to REC but the W3
used to ignore their own process documents, they're getting much
better, but keep an eye on them - the HTML WG are also the worst IMO.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.