473,386 Members | 1,830 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,386 software developers and data experts.

programtically select javascript link

I am running a service (sourceforge.net/projects/statfink/ ) that
pulls and displays fantasy football statistics. One of the
limitations is that it only pulls stats for games that are active or
completed at the time a specific button on the server is selected.
This button calls a javascript function. I'm looking for a method to
select that button from an application started periodically through a
cron task. Any suggestions?

Sep 27 '07 #1
3 3464
pr
rembi wrote:
I am running a service (sourceforge.net/projects/statfink/ ) that
pulls and displays fantasy football statistics. One of the
limitations is that it only pulls stats for games that are active or
completed at the time a specific button on the server is selected.
This button calls a javascript function. I'm looking for a method to
select that button from an application started periodically through a
cron task. Any suggestions?
Please explain again. The way I read it, you want to run a browser-based
application from a cron task. That can't be right. Where is this 'button
on the server' and who selects it?
Sep 27 '07 #2
On Sep 27, 1:09 pm, pr <p...@porl.globalnet.co.ukwrote:
rembi wrote:
I am running a service (sourceforge.net/projects/statfink/ ) that
pulls and displays fantasy football statistics. One of the
limitations is that it only pulls stats for games that are active or
completed at the time a specific button on the server is selected.
This button calls a javascript function. I'm looking for a method to
select that button from an application started periodically through a
cron task. Any suggestions?

Please explain again. The way I read it, you want to run a browser-based
application from a cron task. That can't be right. Where is this 'button
on the server' and who selects it?
Ok, let me approach this from a different angle...A visit a webpage
that provides a service to me--by service, I simply mean that it
performs an action that I am interested in. To receive that service,
all I have to do is click a button. The button click initiates a call
to some javascript which completes the service. What I would like to
do is programatically simulate the "click", or to say it differently,
initiate the action specified by the <a href=...or onclick(...)
tags. I've seen a perl package that comes close
(WWW::Mechanize)...but it doesn't support javascript.

Does that help?

Sep 28 '07 #3
pr
rembi wrote:
Ok, let me approach this from a different angle...A visit a webpage
that provides a service to me--by service, I simply mean that it
performs an action that I am interested in. To receive that service,
all I have to do is click a button. The button click initiates a call
to some javascript which completes the service. What I would like to
do is programatically simulate the "click", or to say it differently,
initiate the action specified by the <a href=...or onclick(...)
tags. I've seen a perl package that comes close
(WWW::Mechanize)...but it doesn't support javascript.

Does that help?
Yes, it does. I don't think you'll have any luck adapting a
browser-based javascript application for use in a cron task, but you can
mimic the browser's HTTP output very simply from a command line script.

If you don't want to, or can't use the PHP command line interface to
send/receive HTTP, then think about Wget
(http://www.gnu.org/software/wget/). It's primarily a download utility,
but it can send different headers, including POST (for forms), and save
any results to file. You can automate it using a standard shell script.

HTTP itself isn't very hard to understand; an Ajax tutorial might tell
you as much as you need to know. A quick way to find out what the
browser is saying to the server is to use a traffic analyser like
Wireshark (http://www.wireshark.org/), or Firefox's 'Live HTTP Headers'
extension (http://livehttpheaders.mozdev.org/).
Sep 29 '07 #4

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

Similar topics

3
by: Phil Powell | last post by:
Has anyone here ever done a case where you have a select multiple form element and you have to do both server-side and client-side validation? I am honestly not sure how to do it in Javascript (I...
5
by: ree32 | last post by:
I am wondering if XSL has the ability to select a node when a link is clicked on the XML document. i.e. So when a link is clicked it displays more information on that particular node ( i.e. shows...
4
by: headware | last post by:
I have a <select> control that contains many entries. It allows the user to multi-select a group of them, click a button, and store the selected data in a database. Normally they do this starting...
5
by: John | last post by:
Hi, I have the following code: <FORM> <font size="3">Brands </font><br /> <SELECT SIZE="1" NAME="categorylist" STYLE="font-size: 8pt"> <OPTION VALUE=http://my.domain,.com/cetegory1.html...
2
by: jascraig | last post by:
Here's my dilemma. I'm working with a frameset with 3 frames (header,content,control). My control frame contains a select list with buttons for next and previous. When the next button is pushed...
1
by: Mad Scientist Jr | last post by:
I'm stuck trying to work with a HTML <SELECT> control and javascript (similar to DualList but that control doesn't offer enough options to totally control the text on the buttons and control, also...
3
by: Luis Esteban Valencia | last post by:
Is there a way to make this kind of graphics with asp.net? http://www.avansoft.net/~levalencia/Dibujo.GIF
1
by: Steve M. | last post by:
Hello all. I have a dropdown list: <select name="select" class="mapMenu" onChange="JumpToIt(this)"> <option selected value="none">Select a Tool --</option> <option...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.