Re: does anyone know how to do this???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here you go.

<script language="javascript" type="text/javascript">
function checkAll()
{
for (var i=1;i<=3;i++)
    document.messages["MSGS"+i].checked = document.messages.MA.checked;
}
</script>

-jmb
----- Original Message ----- 
From: "Jason" <jason@haffey.com>
To: <php-objects@yahoogroups.com>
Sent: Saturday, September 18, 2004 6:05 AM
Subject:  does anyone know how to do this???


> I have been racking my brain to figure out how they do this...
>
> If you go to just about any web based email, you will have Check
> Boxes down the side next to each email.  There is the one check box
> at the top that if you click, all the rest "check up".  That part
> already did (with javascript) but then when I try to do a deleted,
> mark read, or etc. I cant figure out how to run a loop to check each
> checkbox.
>
> here is the basic code I have...(the HTML)
>
> <script language="javascript" type="text/javascript">
> function checkAll()
> {
> document.messages.MSGS1.checked = document.messages.MA.checked;
> document.messages.MSGS2.checked = document.messages.MA.checked;
> document.messages.MSGS3.checked = document.messages.MA.checked;
> }
> </script>
>
> <input type="checkbox" name="MA" onclick="checkAll();"></td>
> <input type="checkbox" name="MSGS1" value="ON"></td>
> <input type="checkbox" name="MSGS2" value="ON"></td>
> <input type="checkbox" name="MSGS3" value="ON"></td>
>
> and so on......
>
> but when I click the submit button I run into an issue as I dont know
> how to do a loop that can create the term:
>
> for($i=1;$i<=$msg_count;$i++){
>     if(MSGS$i==true){do this)
> }
>
> I did try to do an array but that didnt work with my loop nor my
> javascript:
>
> <script language="javascript" type="text/javascript">
> function checkAll()
> {
> document.messages.MSGS.checked = document.messages.MA.checked;
> document.messages.MSGS.checked = document.messages.MA.checked;
> document.messages.MSGS.checked = document.messages.MA.checked;
> }
> </script>
>
> <input type="checkbox" name="MA" onclick="checkAll();"></td>
> <input type="checkbox" name="MSGS" value="ON"></td>
> <input type="checkbox" name="MSGS" value="ON"></td>
> <input type="checkbox" name="MSGS" value="ON"></td>
>
>
> I just want to finish this part of my script so if anyone is willing
> to help me out so I can move on I would be really really happy,
> thanks in advance.
>
>
>
>
>
> PHP Data object relational mapping generator -
http://www.meta-language.net/
> Yahoo! Groups Links
>
>
>
>
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux