PDA

View Full Version : Help! Javascript and php



Hokie19
05-28-2009, 08:29 PM
Hi I am trying to have a link inside of a menu array go to a php page that calculates ping and trace route. Here is my menu array.


//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="test.php" onclick="window.open(this.href,\'\',\'width=600, height=350, resizable=no, scrollbars=yes, toolbar=no, status=no, menubar=no, top=170, left=350\');return false;">Ping</a>'
menu1[1]='<a href="#">Traceroute</a>'
menu1[2]='<a href="#">Reboot Device</a>'
menu1[3]='<a href="#">Configuration Changes</a>'
menu1[4]='<a href="#">Interface Status</a>'
menu1[5]='<a href="#">SSH Terminal</a>'
menu1[6]='<a href="#">Versions Installed</a>'

right now the link only opens a new window of the php page. From this page you click one of the pictures and it will calculate ping and traceroute for that particular static IP address.

My question is how can I get to this second page without going through the first page of clicking the picture. So, by just clicking the link from the menu array I can have a pop up window with the ping and traceroute results. All help is appreciated.