473,555 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="javascrip t:GetAgent('MA1 42')">

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 1644
livin wrote:
I use a web page that brings up a table with a series of links that look
like this...

<a href="javascrip t:GetAgent('MA1 42')">

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="IFviewpag es" onload="doSomet hing()"
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.oIFviewpag es=self.documen t.getElementByI d("IFviewpages" )
self.aLinks=sel f.oIFviewpages. contentWindow.d ocument.getElem entsByTagName(" 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
6980
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 interessa disattivarlo senza cancellarlo per poi riattivarlo al bisogno senza rilanciare lo script di creazione. Grazie a tutti Hi I need to disable a...
7
1684
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: http://www.wgtn.net/Business/category_layer.htm A mouse-over of any of the letters in that left vertical panel of letters shoud trigger a JS script that shows the...
8
9704
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 you, ya gotta ask yourself, what's wrong? CREATE TRIGGER DB2ADMIN.CHECK_INSTOCK BEFORE INSERT ON DB2ADMIN.PRODUCTORDER REFERENCING NEW AS NEW_ORDER
1
1631
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# form and how to check if the trigger already exist regards Sandi Antono
9
9299
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, with the exception of the table name. I could manually change the table name in the trigger and create it, over and over, but I'd like to automate...
1
9067
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 make it more clear, i will add an entry like as below in postgres database table file_id script_run_time crd_extract.sh ...
7
3052
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 creates and populates tables in my SQL Server 2005 database. The program fails on the inserts on "tblB" because the field it creates is too small for...
1
6981
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 page has multiple button such login page with a search function somewhere around, then it's not respond properly. I have attached a brief example of...
11
7851
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' does not exist drop table log_errors_tab;
1
2022
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 character. -- If you wish to execute this script through the CLP, you will need -- to add the CLP option -td"^" to your command line, for example: --...
0
7542
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7824
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8060
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7587
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7903
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6176
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5170
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2034
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
863
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.