473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to trigger a .js from script?

I use a web page that brings up a table with a series of links that look
like this...

<a href="javascript:GetAgent('MA142')">

these links open pages that look like this...
http://info.webpage.com/Roster/Scrip...sp?PubID=MA142

I'd like to use a script to sequentially trigger each link to open the pages
one at a time so I can get the info from the pages that open with the links.

Can someone help by showing some example code as to how to either trigger
the GetAgent script or to send the full URL... I'm a pretty lousy scripter.

I appreciate the help!
Sep 21 '05 #1
1 1637
livin wrote:
I use a web page that brings up a table with a series of links that look
like this...

<a href="javascript:GetAgent('MA142')">

these links open pages that look like this...
http://info.webpage.com/Roster/Scrip...sp?PubID=MA142

I'd like to use a script to sequentially trigger each link to open the pages
one at a time so I can get the info from the pages that open with the links.

Can someone help by showing some example code as to how to either trigger
the GetAgent script or to send the full URL... I'm a pretty lousy scripter.

I appreciate the help!


If the pages you are manipulating are *not* on your own site, then
you will need to do some extra work to bypass the cross-domian
security features, but none the less , the notes below might help

Use an <iframe name="IFviewpages" onload="doSomething()"
src="blank.html"></iframe>

Each time a page loads in the iframe, your function would get called.

in that function you can obtain the links
self.oIFviewpages=self.document.getElementById("IF viewpages")
self.aLinks=self.oIFviewpages.contentWindow.docume nt.getElementsByTagName("A")

you can iterate through these and run them into a second iframe
setup like the first with it's own onload funtion to parse the page ,
then trigger the next link in the array

There is also XMLHTTP , which could be more usefull in retrieveing
the page contents.


--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
Sep 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pecos Bill | last post by:
Salve, non riesco a disabilitare un trigger su sqlserver nè da query analyzer, nè da enterprise manager. In pratica tal cosa riuscivo a farla in Oracle con TOAD, mentre qui non riesco. Mi...
7
by: news frontiernet.net | last post by:
I have a project that uses mouse-over JS script to show and hide layers that works well in MSIE 6.0 and Opera. But, it does not work in NS nor Mozilla. It is here: ...
8
by: sithellaneous | last post by:
Hi, I have looked over various forums, and refined this trigger to the best of my abilities, but when someone pastes a trigger using code -very- similar to yours and it still doesn't work for...
1
by: sandi | last post by:
Please Advice... I need to create SqlServer2005 trigger from C# form. so all my trigger can re-create if i push one button on my app.... i need to know how i create and delete trigger from c#...
9
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger,...
1
by: sainathr | last post by:
Hi, I would like to run shell scripts with respect to the time mentioned in postgres data base tables. Postgres database should trigger the shell script for the time mentioned in the table. To...
7
by: RogBaker | last post by:
I haven't gotten a response yet, so I moved this from another group. I have been working on this for 2 days so if anyone has any ideas, I would be grateful. I have a 3rd party program that...
1
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
1
by: rushpuppy | last post by:
Helo everybody i am trying to make a trigger. But my trigger generates me an error i can not explain. This is my trigger code: -- This script has been created using ^ as the termination...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.