-
trouble understanding redirect link
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,
-
are you trying to open the website in a new window?? If so, why not use the HTML code target="_blank" ?? this opens it in a new window too
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules