Population of checkboxes function called in a different frame

G

Gabriel Murphy

Hello All:

I am trying to populate a list of checkboxes in a different frame that
the frame in which I am calling the function from. Below is an
example:

http://www.gabrielmurphy.com/javascript/5/

The left frame contains the checkbox titled "Check All". When I click
this (onClick), I would like for it to invoke the function in the
right frame that automatically populates the checkboxes.

From the example above, I can get this to work for a textlink (click
on "Check All") but I cannot get it to work for checkboxes.

Any help would be appreciated.
 
S

Stuart Palmer

I think it should be targetname.formname.checkboxname.checked or something

so to check boxes CALLED "MYCHECKS" in frame called 'MAIN" in a form called
"MYFORM" from a frame 'X'. You would put:-
MAIN.MYFORM.MYCHECKS.checked = True (if you are doing a list of checkboxes
with the smae name you need to loop round the number of checkboxes you have
from 0 to x and put MAIN.MYFORM.MYCHECKS.checked = true

Code not tested, but I think this is the way to do it.

Good luck

Stu
 
D

Daniel

Gabriel Murphy said:
Hello All:

I am trying to populate a list of checkboxes in a different frame that
the frame in which I am calling the function from. Below is an
example:

http://www.gabrielmurphy.com/javascript/5/

The left frame contains the checkbox titled "Check All". When I click
this (onClick), I would like for it to invoke the function in the
right frame that automatically populates the checkboxes.

From the example above, I can get this to work for a textlink (click
on "Check All") but I cannot get it to work for checkboxes.

Any help would be appreciated.

You should use the onChange handler for checkboxes =)


Cheers,
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top