All the examples found through google suck.I have two frames.In the right frame, I have some JavaScript going on, and I have an integer, call it testInt.By clicking on a link in the left frame I want to do two things:-change the value of testInt (say, increase it by one)-change an img in the right frame, which I've given the id="pic"Anyone know how?
7/27/2006 1:17:05 PM
frames?
7/27/2006 1:41:33 PM
Yeah - you use 'em to divide up the browser window and display two pages at once.
7/27/2006 2:49:06 PM
yeah, we know. what the little crazy eyes meant was basically: "frames are an outdated technology and should not be used in modern webpages unless you have a damn good reason. otherwise, you should be using templates or includes to create consistent headers or sidebars, if that was the intent of the frames. it would be to your benefit for your webpage asthetics and probably functionality, and certainly for your JS programming, to update the structure to use more modern web programming practices"
7/27/2006 3:07:55 PM
to be fair, the last personal site i did (i redesign my own site every 8-12 months for fun) used frames and it looked fine in both IE and firefox...i couldn't think of a single reason NOT to use frames for what i was doingthat said, my most recent redesign uses php for the menu structure and then includesi'm just saying
7/27/2006 3:11:00 PM
7/27/2006 3:15:05 PM
Try accessing the frame by it's ID, then the ID of the element you want to change.
7/27/2006 4:00:56 PM
How?
7/27/2006 6:28:23 PM
document.getElementById(frameID).getElementById('pic').srcsomething along those lines.
7/27/2006 7:02:10 PM