By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,380 Members | 1,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,380 IT Pros & Developers. It's quick & easy.

Population of checkboxes function called in a different frame

P: n/a
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.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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[i].checked = true

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

Good luck

Stu

"Gabriel Murphy" <ga*****@gabrielmurphy.com> wrote in message
news:ea**************************@posting.google.c om...
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.

Jul 20 '05 #2

P: n/a

"Gabriel Murphy" <ga*****@gabrielmurphy.com> wrote in message
news:ea**************************@posting.google.c om...
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
--
There are 10 kinds of people: Those who know binary and those who don't.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.