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

How to Call CGI from Java

How to Call CGI from Java

(OP)
I've got a hardware device that's controlled by a cgi server and if I use the following html it will turn on a cooling fan.

<div id="layer3" style="position:absolute; top:338; left:34; z-index:9;" ><A href=/rc.cgi?o=1,1 target="empty">
<img id="FanPic" onclick = "ChangeFanState();" src="Fan&LIO(1,"%u",1);.gif" border=0 height="72" width="72"/></div>

I'd like to be able to do this from javascript so as to turn on several devices with out changing the web page. So I've tried

window.location.href = "/rc.cgi?o=1,1";

but this is not working. Any ideas?
Thanks
 

RE: How to Call CGI from Java

You should ask this in the Javascript forum as this one is related to Java.

Anyway, I guess the URL /rc.cgi?o is relative, so you will need to add the rest of it (http://servername/path)

Cheers,
Dian

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