TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-22-2009, 08:09 PM   #1 (permalink)
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
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
Should I drop PHP for Java? webosb General 11 04-05-2009 06:58 AM
Load url on select, via drop down menu h0ly lag XHTML, HTML, CSS 2 10-03-2008 05:39 AM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM
Drop down menu in javascript imilkcheese Javascript, AJAX, E4X 2 05-08-2008 04:31 PM


All times are GMT. The time now is 09:58 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design