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

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

 



why not let php handle the check? I mean you can use your  loop logic in php
> for($i=1;$i<=$msg_count;$i++){
>     if(MSGS$i==true){do this)
> }
you can do this by submitting the form (via post or get),  but instead
of MSG$i==true you'll have to use MSG$i=='ON' since your checkbox
input statement is this

> <input type="checkbox" name="MSGS1" value="ON"></td>
> <input type="checkbox" name="MSGS2" value="ON"></td>
> <input type="checkbox" name="MSGS3" value="ON"></td>




On Sat, 18 Sep 2004 13:05:07 -0000, Jason <jason@haffey.com> wrote:
> 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
> 
> 
> 
> 
> 



-- 
==============
Engr. Andrew John P. Young
IT Consultant/RH Technician

"With God Everything IS POSSIBLE"



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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