471,044 Members | 948 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,044 software developers and data experts.

to replicate the click of a link

13
Hi friends,

is there a way where by I can programmatically click a link in a web page?.if its a button I can use document.formname.element(i).click where element(i) might represent the button.Is there a similar action for a link?

Thanx in advance,
Balu435
Feb 13 '07 #1
2 1467
mrhoo
428 256MB
function(){location=somelinkelement.href}
or if you have an onclick defined for the link
function(){return somelinkelement.onclick()}
Feb 13 '07 #2
balu435
13
function(){location=somelinkelement.href}
or if you have an onclick defined for the link
function(){return somelinkelement.onclick()}
Hi..
thanx for the reply.
My qn wasn't proper though..I was trying to click the link from a VBA application.I used the .innertext property to retrieve the name of the link and then used the onclick event to simulate the click event.Its working now.
Thanx for ur help..
Feb 16 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

21 posts views Thread by news.btinternnet.com | last post: by
reply views Thread by Demetri | last post: by
6 posts views Thread by Michael.Suarez | last post: by
11 posts views Thread by yangsuli | last post: by
5 posts views Thread by Xu, Qian | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.