Jump to content

Clicking A Link In Javascript


kilp-web@sbcglobal.net

Recommended Posts

I volunteer with a non-profit that maintains a database of all of its classes,workshops, etc. I have written a number of AppleScripts that take advantage of the"do JavaScript" function in Safari to post data about the events to sites that advertise events. The purpose of this is to avoid rekeying the data in the database.I review all posts before they are submitted and I do all of the Captchas manually.I am now working on a web page with the following html.<h3>Select your Event date</h3><ul class="z-tabs"><li class="z-current"><a href="#">Calendar View</a></li><li><a href="#">Advanced View</a></li></ul>dClicking on either link causes a different <div> to be displayed. I assume I canget to the right link using something like the following:var jLinks = document.getElementsByTagName('a');for (var i = 0; i < jLinks.length; i++) { if (jLinks.innerHTML == "Calendar View") { // Here is my problem. }}What I can't figure out how to do is to select the link in JavaScript.When it is a link that points to a page, I just grab the URL and load the page,but here I want the "side effects" of the link which were presumably set bya JavaScript routine.Suggestions?Thanks,Jerry

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...