By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,835 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,835 IT Pros & Developers. It's quick & easy.

to replicate the click of a link

P: 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
Share this Question
Share on Google+
2 Replies

100+
P: 428
function(){location=somelinkelement.href}
or if you have an onclick defined for the link
function(){return somelinkelement.onclick()}
Feb 13 '07 #2

P: 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.