View Full Version : How to access hyperlinks automatically??
06-16-2003, 12:31 PM
06-16-2003, 01:49 PM
with the click() function:
06-16-2003, 02:22 PM
Hi brothercake, thanks a lot!
But i've a problem here.. Besides "document.getElementById();", is there any other methods?? Bcos i'm currently writing a program which access a website and i'm not sure how to get the ElementById()...
06-16-2003, 03:54 PM
Well you have to assign the link an ID attribute, for example:
<a href="something.html" id="mylink">
then it would be
<a href="somepage.html" onclick="return myFunction()">
then in myFunction you return false, to prevent the link being followed:
// do whatever
06-16-2003, 04:02 PM
Oic.. but if the <A HREF> doesn't contain ID, that means i can't get that method rite?? Coz i'm accessing someone else's page, and it has many hyperlinks, but it simply uses <A HREF="page1.jsp">...
06-16-2003, 10:22 PM
You can't access someone else's page, programmatically, if it's hosted at another domain.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.