INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

press javascript button remotely?

press javascript button remotely?

(OP)
My modem/router has a web interface where you can press a button to connect to ISP if connection drops. This is a manual process. The web interface has a huge amount of javascript and I am not a javascript expert. The HTML for the reconnect button looks like:

<a href="javascript:do_apply(1);" id="connect_btn" class="btn" width="70%">

I need to "press" this button from a PHP program on my home network using cURL. Is there a way to form the URL so this button is "pressed"? Thanks.

RE: press javascript button remotely?

Add the necessary parameters to the URI as a querystring (always assuming the ISP process accepts GET queries)

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: press javascript button remotely?

(OP)
Any suggestions on what parameters in a URL query string result in execution of a javascript function?

192.168.254.254/index.htm?function=do_apply(1)

?

RE: press javascript button remotely?

Haven't a clue, without seeing all of the code from your router's firmware HTTP server ... ... only your ISP can tell you that.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: press javascript button remotely?

(OP)
well... i can view the page source with firefox but might be harder if script calls in stuff from elsewhere... probably just end up using telnet from PHP script to test connection and reconnect if necessary... fun job for weekend

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close