View Single Post
Old 07-22-2009, 08:09 PM   #1 (permalink)
Shiag
The Visitor
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Shiag is on a distinguished road
Default php drop down menu

ok so I am new to php, and I am trying to make a drop down menu that has different actions. when you make your selection I want you to be sent to a php function that clears the table, enables the checkboxes, and brings up an alert inside of a class that makes a table of information, right now I am stuck on the checkbox enabling here is my code:

class table
{
function display()
//Begin display() function.
{
/**
* Creation of the table to be used by the website.
* <li>Global variable <code>$custNum</code> is put in the title of the table</li>
* <li>The column titles are given.</li>
* <li>The drop down box is created.</li>
*/
print("
<html>
<head>
<SCRIPT LANGUAGE='JavaScript'>
<!--
function enable()
{
if(document.getElementById('which') = 3)
{
document.form.checkbox.disabled = false;
}
else
{
document.form.checkbox.disabled = true;
}
}
</script>
<table width='100%'>");
print("<tr>
<td><input type='checkbox' disabled size='10' name='checkbox' value = 'ON'></td>
<td><select name = "status" onchange=enable(document.form.status.selectedIndex )>
<option name = "process" value = "process">Process</option>
<option name = "cancel" value="cancel">Cancel</option>
<option name = "partial" value="partial">Partial</option>
</select></td>
</tr>");
}
Shiag is offline  
Reply With Quote