Following occurred when my colleague tested on his machine using IE
6.0 SP 4 for Win2000 (I am using Linux/Mozilla):
Ok, back to the drawing board, it didn't work when my colleague tested
on his machine using IE 6.0 SP4 for Win2K:
I tried with the HTML code below, but IE spat out the following:
Line: 42
Char: 1
Error: 'document.image Form.move[]' is null or not an object
Code: 0
URL: file://C:\Documents and Settings\eduard o\Desktop\test. html
HTML code:
<html>
<head>
<title></title>
<body>
<script>
<!--
~ function selectAll(check State, selectStatus, obj) {
~ if (document.image Form.select_all .checked ||
document.imageF orm.deselect_al l.checked) {
~ for (i = 0; i < obj.length; i++) {
~ obj[i].checked = checkState;
~ }
~ if (selectStatus.t oLowerCase() == 'select')
document.imageF orm.deselect_al l.checked = false;
~ if (selectStatus.t oLowerCase() == 'deselect')
document.imageF orm.select_all. checked = false;
~ }
}
//-->
</script>
<table>
<tr>
~ <td bgcolor=ffffff> <a
href="./images/mu-spin/kyrka.jpg">kyrk a.jpg</a></td>
~ <td bgcolor=ffffff> Show Metadata</td>
~ <td bgcolor=ffffff> <input type=checkbox name="move[]"
value="kyrka.jp g"> - Move?</td>
</tr>
<tr>
~ <td bgcolor=ffffcc> <a
href="./images/mu-spin/banner.jpg.jpeg ">banner.jpg.jp eg</a></td>
~ <td bgcolor=ffffcc> <a
href=index.php? section=image&a ction=edit&choo seAlbum=1&album =mu-spin&id=147>Sho w
Metadata</a></td>
~ <td bgcolor=ffffcc> <input type=checkbox name="move[]"
value="banner.j pg.jpeg"> - Move?</td>
</tr>
<tr>
~ <td bgcolor=ffffff> <a
href="./images/mu-spin/kyrka_gray.jpg" >kyrka_gray.jpg </a></td>
~ <td bgcolor=ffffff> <a
href=index.php? section=image&a ction=edit&choo seAlbum=1&album =mu-spin&id=145>Sho w
Metadata</a></td>
~ <td bgcolor=ffffff> <input type=checkbox name="move[]"
value="kyrka_gr ay.jpg"> - Move?</td>
</tr>
<tr>
~ <td colspan=3 bgcolor=ddddee>
~ <input type=checkbox name="select_al l" value=1
onClick="select All(true, 'select', document.imageF orm['move[]'])"> -
Select All <input type=checkbox name="deselect_ all" value=1
onClick="select All(false, 'deselect', document.imageF orm['move[]'])">
-
De-Select All</td>
</tr>
</table>
</body>
</html>
Phil
"Matt Kruse" <ne********@mat tkruse.com> wrote in message news:<c5******* **@news3.newsgu y.com>...
"Phil Powell" <so*****@erols. com> wrote: This will work with a checkbox group that has to have this naming
convention for PHP:
I will also have a checkbox that will "select all" and "de-select
all":
Checkboxes don't have onChange() events, they have onclick() events.
If you want to ease your pain a bit, you could consider using my "Checkbox
Group" library, which would handle all this for you quite easily:
http://www.mattkruse.com/javascript/checkboxgroup/