RE: [PHP-DB] parsing checkbox array without [] and selecting all boxes

2001-07-10 Thread Michael Rudel

Hi Olinux,

U may want 2 try this js-code:

function ToggleAllCheckboxes()
{
   for( var x = 0; x < document.MYFORM.elements.length; x++ )
   {
  var y = document.MYFORM.elements[x];
  if( y.name != 'CHECKALL') y.checked = document.MYFORM.CHECKALL.checked;
   }
}

As U C, U have 2 setup a checkbox named 'CHECKALL'.

Most of the Freemailers use this script (or alike), too.

Of course you can now use a checkbox-array using [].

Hope this helps.

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -

Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
___

Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
___



> -Original Message-
> From: olinux [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 1:43 AM
> To: php-db
> Subject: [PHP-DB] parsing checkbox array without [] and selecting all
> boxes
>
>
> Hey all,
>
> The end result of all of this should be similar to an online
> email client
> like hotmal, or yahoo where  you can select a number of messages to be
> deleted.
>
> I have a form that when generated, the html looks similar to this:
>
> ===
>
> 
> 
> 
> 
> 
>
>  onClick="this.value=check(this.form.broker)">
>
> ===
>
> I am trying to create a script that will delete each checked
> box. I can get
> this script to work by adding '[]' to 'broker'  The reason
> for each name
> being the same and not using the '[]' is because I want to be
> able to use a
> javascript that selects all boxes. Is there a way to do this.
> Or better yet,
> does anyone have a jscript that will work with the [] characters?
>
> Thanks
> olinux
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] parsing checkbox array without [] and selecting all boxes

2001-07-09 Thread Beau Lebens

don't your checkboxes act like radio buttons when you check them if they all
have the same name?

i would do something like


\n";
}

?>


<!--

function check_all( num_boxes ) {
for ( this_box = 0; this_box <= num_boxes; this_box++ ) 
document.mail_boxes['broker:' + this_box].checked = true;
}

// -->






That's all completely untested, but it might work :P

// -Original Message-
// From: olinux [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 10 July 2001 7:43 AM
// To: php-db
// Subject: [PHP-DB] parsing checkbox array without [] and selecting all
// boxes
// 
// 
// Hey all,
// 
// The end result of all of this should be similar to an online 
// email client
// like hotmal, or yahoo where  you can select a number of 
// messages to be
// deleted.
// 
// I have a form that when generated, the html looks similar to this:
// 
// ===
// 
// 
// 
// 
// 
// 
// 
// 
// 
// ===
// 
// I am trying to create a script that will delete each checked 
// box. I can get
// this script to work by adding '[]' to 'broker'  The reason 
// for each name
// being the same and not using the '[]' is because I want to 
// be able to use a
// javascript that selects all boxes. Is there a way to do 
// this. Or better yet,
// does anyone have a jscript that will work with the [] characters?
// 
// Thanks
// olinux
// 
// 
// _
// Do You Yahoo!?
// Get your free @yahoo.com address at http://mail.yahoo.com
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: 
// [EMAIL PROTECTED]
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] parsing checkbox array without [] and selecting all boxes

2001-07-09 Thread olinux

Hey all,

The end result of all of this should be similar to an online email client
like hotmal, or yahoo where  you can select a number of messages to be
deleted.

I have a form that when generated, the html looks similar to this:

===









===

I am trying to create a script that will delete each checked box. I can get
this script to work by adding '[]' to 'broker'  The reason for each name
being the same and not using the '[]' is because I want to be able to use a
javascript that selects all boxes. Is there a way to do this. Or better yet,
does anyone have a jscript that will work with the [] characters?

Thanks
olinux


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]