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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.