maymann Posted January 3, 2012 Author Share Posted January 3, 2012 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 https://forums.phpfreaks.com/topic/252303-multiselect-phone-reboot-script/page/2/#findComment-1303705 Share on other sites More sharing options...
maymann Posted January 9, 2012 Author Share Posted January 9, 2012 Kicken, anyone... Thanks in advance :-) ! Link to comment https://forums.phpfreaks.com/topic/252303-multiselect-phone-reboot-script/page/2/#findComment-1305715 Share on other sites More sharing options...
maymann Posted January 14, 2012 Author Share Posted January 14, 2012 Please, can anyone help with this...? ~maymann Link to comment https://forums.phpfreaks.com/topic/252303-multiselect-phone-reboot-script/page/2/#findComment-1307583 Share on other sites More sharing options...
maymann Posted January 17, 2012 Author Share Posted January 17, 2012 SOLVED... Got it working... finally... 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 https://forums.phpfreaks.com/topic/252303-multiselect-phone-reboot-script/page/2/#findComment-1308462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.