logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in  RSS Apache Lounge  


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.



Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: SELECT ALL option in drop down listbox
Author
fifimtwana



Joined: 24 Feb 2011
Posts: 22

PostPosted: Mon 28 Mar '11 10:19    Post subject: SELECT ALL option in drop down listbox Reply with quote

Hey guys

Can someone please help me with this chllenge im facing...

Here is the thing, I want to be able to have an option "Select All" under the dropdown list.
The select all option must allow a user to select all the names of students (which are already listed in the drop down list) and book all of them at the same time for leave or sick leave or offsite work.

Thanx in advance..
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6742
Location: Germany, Next to Hamburg

PostPosted: Mon 28 Mar '11 12:06    Post subject: Reply with quote

http://lmgtfy.com/?q=javascript+dropdown+select+all
Back to top
fifimtwana



Joined: 24 Feb 2011
Posts: 22

PostPosted: Tue 29 Mar '11 8:29    Post subject: Reply with quote

Thank you James Bond, you've been very helpfull Wink
Back to top
fifimtwana



Joined: 24 Feb 2011
Posts: 22

PostPosted: Tue 29 Mar '11 10:46    Post subject: Reply with quote

I've looked at the link, bot still cant figure out what to do..... I'n a newbie in php so please bare with me....

ive used the code below to get the names to appear in the dropdown list

$STATUS = "ACTIVE";
$query4 = "select ID,Name,Surname from students where Status='$STATUS' and LEARNERSHIP='$LSHIP' and LEVEL='$LVL' and YEARGROUP ='$GRP' order by Surname";
$result4=mysql_query($query4);
$num=mysql_numrows($result4);

<TABLE>
<FORM NAME ="ATT_REG" METHOD ="Get" ACTION = "">
<TR>
<TD> <font size="2" face="bmwtyperegular">
Select Student to Book:
</TD>
<TD>

<select name="ID">
<?PHP
while($nt=mysql_fetch_array($result4))
echo "<option value=$nt[ID]>$nt[Name] $nt[Surname]</option>";
echo "</select>";

?>
[/b]
Back to top


Reply to topic   Topic: SELECT ALL option in drop down listbox View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner