| View previous topic :: View next topic |
| Author |
Message |
autos06 Enthusiastic Coder
Joined: 13 May 2006 Posts: 123 Location: New York
|
G'day.
From Javascript, how do I follow a link?
Say I can grab the link using document.getElementById() how do I click on it?
Reply with quote
|
| |
|
|
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
| |
autos06 Enthusiastic Coder
Joined: 13 May 2006 Posts: 123 Location: New York
| |
kadamat Enthusiastic Coder
Joined: 01 Jun 2006 Posts: 88
|
Ikopar, are you sure?
I'm using firebug, and I can grab the element, but it doesn't have a click() method
Reply with quote
|
| |
|
|
Ikopar Enthusiastic Coder
Joined: 26 May 2006 Posts: 168
|
Well it depends on the UA
The other option is to get the location and manually change to it
Reply with quote
|
| |
|
|
kadamat Enthusiastic Coder
Joined: 01 Jun 2006 Posts: 88
|
Document.getElementsByTagName('a')[0].click is undefined.
But that returns <a href="/home/"
Using firefox
That's the only UA i need to support
Reply with quote
|
| |
|
|
Ikopar Enthusiastic Coder
Joined: 26 May 2006 Posts: 168
| |
kadamat Enthusiastic Coder
Joined: 01 Jun 2006 Posts: 88
| |
Ikopar Enthusiastic Coder
Joined: 26 May 2006 Posts: 168
| |
kadamat Enthusiastic Coder
Joined: 01 Jun 2006 Posts: 88
| |
| Page 1 of 2 |
Goto page 1, 2 Next |
|