![]() Preserved Topic: Difference between using href=javascript:... and onClick=....? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Hmmm... I guess I'm wrong... |
Maniac (V) Inmate From: Brisbane, Australia |
![]() You shouldn't be having a problem but I was curious so I decided to test it. It appears that using "this" points to different objects depending on which method your using. Here's my little example: |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() It's because onclick is an event of the A element object. The JavaScript URL is in no way related to the A element. |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Ah - that makes sense (the event part). |
Paranoid (IV) Inmate From: under your rug, |
![]() Here read this it should be helpfull ( click me ) |
Paranoid (IV) Inmate From: under your rug, |
![]() None of those will work on netscape 4 or IE 4 will they? |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() |
Obsessive-Compulsive (I) Inmate From: Tampa, FL |
![]() I'm pretty new here (started reading in the last few days) but I came across this thread, and wanted to throw my 2 cents worth in. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() There are two reasons for putting the href in the link: |