Jump to content

Multiselect phone-reboot script


maymann

Recommended Posts

Hi kicken,

 

Thanks for your kind reply - this sounds/looks just like what i need...:-)

To answer your questions:

1. you are right: passing, was the right word...

2. yes: IP is the value of each phone

 

how do I make array in php... and how does this work now from web/shell ?

I'm a bit confused - sorry for my php/java-script ignorance...

 

Would it perhaps be possible for you to show me how/where this is done in my 2 files - I don't know how/where to edit this, eventhough you gave a nice explanation.

 

Thanks in advance :-) !

~maymann

SOLVED...

 

Got it working... finally...  :D

Here is my working multisite index.php:

<head>

</head>

<script type="text/javascript">

function setOptions(chosen){

var selbox = document.formName.ip;

selbox.options.length = 0;

if (chosen == " ") {

    selbox.options[selbox.options.length] = new Option('No site selected',' ');

    }

if (chosen == "1") {

    selbox.options[selbox.options.length] = new Option(' ',' ');

    selbox.options[selbox.options.length] = new Option('HOSTNAME1','IP1');

    selbox.options[selbox.options.length] = new Option('HOSTNAME2','IP2');

    }

if (chosen == "2") {

    selbox.options[selbox.options.length] = new Option(' ',' ');

    selbox.options[selbox.options.length] = new Option('HOSTNAME3','IP3');

    selbox.options[selbox.options.length] = new Option('HOSTNAME4','IP4');

    }

}

 

</script>

 

<form name="formName" method="post" action="polycom-reboot.php">

Conference Phone Reboot

<select name="site" size="1" onchange="setOptions(document.formName.site.options[document.formName.site.selectedIndex].value);">

    <option value=" " selected="selected"></option>

    <option value="1">Site1</option>

    <option value="2">Site2</option>

</select>

<select name="ip" size="1" method="post" action="polycom-reboot.php">

    <option value=" " selected="selected">No phone selected</option>

</select>

<input type="submit" value="Reboot..."/>

</form>

 

</body>

</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.