-----------------------------------------------------------------------
FAQ Topic - I have <a href="javascrip t:somefunction( )"what
.... ?
-----------------------------------------------------------------------
Whatever the rest of your question, this is generally a very bad
use of the javascript pseudo protocol. It was designed so that a
function could return a new page. For example:
` javascript:"<p> Hello</p>" `.
Using it simply to call a function when a link is clicked causes
an error in user agents that do not support javascript, or have
javascript disabled. Instead, use
` <a href="something .html" onclick="somefu nction();return false"`
where something.html is a meaningful alternative. Alternatively,
place the onclick event on another element so that users without
JavaScript aren't even aware that it does anything.
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javas cript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers.
FAQ Topic - I have <a href="javascrip t:somefunction( )"what
.... ?
-----------------------------------------------------------------------
Whatever the rest of your question, this is generally a very bad
use of the javascript pseudo protocol. It was designed so that a
function could return a new page. For example:
` javascript:"<p> Hello</p>" `.
Using it simply to call a function when a link is clicked causes
an error in user agents that do not support javascript, or have
javascript disabled. Instead, use
` <a href="something .html" onclick="somefu nction();return false"`
where something.html is a meaningful alternative. Alternatively,
place the onclick event on another element so that users without
JavaScript aren't even aware that it does anything.
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javas cript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers.
Comment