Wyloch All American 4244 Posts user info edit post |
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 |
Jere Suspended 4838 Posts user info edit post |
frames? 7/27/2006 1:41:33 PM |
Wyloch All American 4244 Posts user info edit post |
Yeah - you use 'em to divide up the browser window and display two pages at once. 7/27/2006 2:49:06 PM |
agentlion All American 13936 Posts user info edit post |
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 |
quagmire02 All American 44225 Posts user info edit post |
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 doing
that said, my most recent redesign uses php for the menu structure and then includes
i'm just saying 7/27/2006 3:11:00 PM |
Wyloch All American 4244 Posts user info edit post |
Quote : | "yeah, we know. what the little crazy eyes meant was basically:..." |
Yeah I know. I was being a sarcastic ass.
I don't know php or css, just plain old newbish HTML and JavaScript. One more bttt in case anyone knows how to solve this problem.7/27/2006 3:15:05 PM |
Stein All American 19842 Posts user info edit post |
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 |
Wyloch All American 4244 Posts user info edit post |
How? 7/27/2006 6:28:23 PM |
Stein All American 19842 Posts user info edit post |
document.getElementById(frameID).getElementById('pic').src
something along those lines. 7/27/2006 7:02:10 PM |