Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Use of A tag's href attribute vs. onClick event handler

partlycloudyOct 23 2005 — edited Oct 26 2005
See

http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/4d2e99b2a8bdbbd2/2d588fb34191a654

The general consensus among all the gurus out there is that using the href=javascript: pseudo-protocol is baaaaad. Bad, bad, bad. It is proprietary, unreliable, undocumented and supported only for backward compatibility.

HTML DB uses that all over the place. In fact, buttons and tabs use only href= "javascript:doSubmit(...)" to do their thing.

I know that HTML DB makes no attempt to "degrade gracefully" on browsers which are not Javascript enabled. In other words, Javascript is a "minimum requirement" for running HTML DB, thats fine.

But I know that Carl, Scott and the rest of the HTML DB team take "correctness" and standards-compliance very seriously.

So, why was the decision made to use href=javascript: vs. onClick="..."?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2005
Added on Oct 23 2005
1 comment
498 views