changintimes
30 Aug 2006, 11:45 PM
new to javascript.........
can somebody help me with this javascript example from my book ?
the following link uses javascript to redirect the user to another page, the user may go to a page via the typical HTML link or through the onclick, javascript command, ( i realize this may be a very common type of link with javascript ), depending on if the user has an old browser or a new one:
<a href="script04.html" onclick="window.location='jswelcome.html';return false">Welcome to our site... c'mon in!</a>
i know the "return false" command is executed if the user has a new browser, but i don't understand why the "return false" command does not also return false the "window.location='jswelcome.html'" command,
can somebody help me with this javascript example from my book ?
the following link uses javascript to redirect the user to another page, the user may go to a page via the typical HTML link or through the onclick, javascript command, ( i realize this may be a very common type of link with javascript ), depending on if the user has an old browser or a new one:
<a href="script04.html" onclick="window.location='jswelcome.html';return false">Welcome to our site... c'mon in!</a>
i know the "return false" command is executed if the user has a new browser, but i don't understand why the "return false" command does not also return false the "window.location='jswelcome.html'" command,