What's more interesting is, using href="javascript://" onclick="etc" works
fine for calling the function, yet the location.href="etc" doesn't work,
but when you call the function using href="javascript: redirect()" the
location.href=etc works fine. Really weird.
- Matt Crampton
Sr. Webtechnologist
Time Warner Inc.
aim:[ MattCCrampton ]
email:[ [EMAIL PROTECTED] ]
On Tue, 22 Mar 2005, Bj wrote:
> Your link works (calls the redirect() function correctly with the URL) but
> the function doesn't. No idea why!
>
> Leaving that aside, to clear up any confusion about the link, usually you
> would put "javascript:" in front of the JS code, i.e.
>
> <a href="#" onClick="JavaScript:redirect('http://www.google.com');">
>
> You can just put the JS in the href but then the link is broken if JS is
> disabled. The convention is to put "#" in the href so that if JS is enabled
> the onClick overrides the #, but if it isn't the link does pretty much
> nothing but at least isn't broken.
>
> As to why the function isn't working, don't know and have some other stuff
> to get on with... but you need to look at why setting
> location.href='http://www.google.com' doesn't send you to Google as that's
> where the problem is.
>
>
> ____ � The WDVL Discussion List from WDVL.COM � ____
> To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
> use the web interface http://e-newsletters.internet.com/discussionlists.html/
> Send Your Posts To: [email protected]
> To change subscription settings, add a password or view the web interface:
> http://intm-dl.sparklist.com/read/?forum=wdvltalk
>
> ________________ http://www.wdvl.com _______________________
>
> You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> To unsubscribe via postal mail, please contact us at:
> Jupitermedia Corp.
> Attn: Discussion List Management
> 475 Park Avenue South
> New York, NY 10016
>
> Please include the email address which you have been contacted with.
>
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.