Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing other frame 1

Status
Not open for further replies.

malonep

Programmer
Jul 14, 2004
44
CA
Hi,
I have two frames and one changes the value in a drop down box in the other.

I have it working on pc ie but when I run it on mac IE it never changes the drop down box. I can get it to print out the correct value on the mac but it won't change it
For the mac section I have:
Code:
alert(parent.ComboFrame.document.all.item('cboGradeSource').value);
will print out the correct value (0 or 1) but when I go
Code:
parent.ComboFrame.document.all.item('cboGradeSource').value = 1;
it doesn't change the value.

Any help would be appreciated

Thanks,
 

AFAIK, document.all is IE/Win only. Use a more compatible method, like getElementById, etc.

Hope this helps,
Dan
 
Do I use getElementbyID for the frame or the drop down box?

Could you please show me an example of how to set the dropdown box on the othe frame


Thanks a million,
 
Code:
parent.frames['ComboFrame'].document.getElementById("cboGradeSource").selectedIndex = 1
selects the second item in the drop down box.

--Chessbot

"Violence is the last refuge of the incompetent." -- Asimov, Foundation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top