Hello,
I have a problem when altering a DIV-element from another frame.
The frameset looks like this:
Frame 'ref.asp' (bodyref) is not viewed on the screen and is used to maintain the login session object by refreshing it every 4 minutes using this simple piece of code:
Now I want to check (every 4 minutes) in 'ref.asp' if things have changed in my database. If so, then update an element in frame 'bodytree' using this code:
The element 'alerting' is a simple DIV-element in the bodytree-frame.
Weirdest thing is that the element is being updated but I get this JS error:
When I place the JS-code in a webpage from the body-frame then everything works fine. But when I place it in ref.asp I get the error. Does anyone have an idea why I get the error?
Thx...
I have a problem when altering a DIV-element from another frame.
The frameset looks like this:
Code:
<frameset rows=0,0,* border=0> <frame name=header src=/header.htm scrolling=no noresize="true" frameborder=0> <frame name=border src=/border.htm scrolling=no noresize="true" frameborder=0> <frameset cols=200,* border=0> <frameset rows=*,0 border=0> <frame name=bodytree src=/emptytree.asp scrolling=no noresize="true" frameborder=0> <frame name=bodyref src=/ref.asp scrolling=no noresize="true" frameborder=0> </frameset> <frameset rows=*,0 border=0> <frame name=body src=/login.asp noresize="true" frameborder=0> <frame name=bodycom src=/comm.asp scrolling=no noresize="true" frameborder=0> </frameset> </frameset> </frameset>
Code:
<META HTTP-EQUIV="REFRESH" CONTENT="250; url=/ref.asp">
Code:
parent.frames["bodytree"].document.getElementById('alerting').innerHTML = '<ul><li>Changed!</li></ul>';
Weirdest thing is that the element is being updated but I get this JS error:
Code:
'parent.frames.bodytree.document' is empty or not an object
Thx...
Comment