Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

northernmunky

macrumors 6502a
Original poster
Jan 19, 2007
829
295
London, Taipei
Can anyone assist me in what should be a fairly simply query, unfortunately I am not a web developer so my code below is literally the extent of my knowledge. Basically, I'm creating a simple webpage that executes a cgi script and returns the results of an executed command. That part works, but whats driving me nuts is...

What I actually want is to have several buttons, that trigger different CGI scripts which send the results to the same iframe (i.e. the iframe id="commandoutput_iframe" one) therefore only referencing that iframe once in the code. At the moment, as I'm sure you shall deduce is the buttons simply reload the entire page and all the scripts within.

I've read plenty of suggestions of using jQuery but my knowledge is zilch on that so I have no idea what I'm supposed to do with the code. This is as far as I've got... does anyone know how I can make this happen? I'd be much obliged to ya - it would make my avatar happier!

Code:
<html>
<head>
<title>Engineering Page</title>
<img src="logo.png">


<h4>Server System Health</h4>
  <body>
    <form> <button id="SystemStatus" onclick="show()">Server Check</button> </form>
    <iframe id="commandoutput_iframe" src="../cgi-bin/sysinfo.cgi" width="900" height="600"></iframe>
  </body>

<h4>System Cluster Check</h4>
  <body>
    <form> <button id="ClusterCheck" onclick="show()">Perform Cluster Check</button> </form>
    <iframe id="commandoutput_iframe" src="../cgi-bin/test.cgi" width="500" height="200"></iframe>
  </body>

</html>
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.