Refresh IFRAME from another page?
-
Hello, Scenario: a1.aspx has two IFRAMES on the page. IFRAME1 diplays content and IFRAME2 is 1px by 1px and continously refreshes. The page src for IFRAME2 checks to see if there has been a change to a table in my DB. If the IFRAME2 page src detects there has been a change it calls a JavaScript function. I would like that JavaScript function to refresh the page src for IFRAME1. I have tried: window.location = 'blabla.aspx' window.frames['myIFRAME'].location = 'blabla.aspx' window.opener.location = 'blabla.aspx' Not getting the results I would like. Any ideas? Thank you. RB
-
Hello, Scenario: a1.aspx has two IFRAMES on the page. IFRAME1 diplays content and IFRAME2 is 1px by 1px and continously refreshes. The page src for IFRAME2 checks to see if there has been a change to a table in my DB. If the IFRAME2 page src detects there has been a change it calls a JavaScript function. I would like that JavaScript function to refresh the page src for IFRAME1. I have tried: window.location = 'blabla.aspx' window.frames['myIFRAME'].location = 'blabla.aspx' window.opener.location = 'blabla.aspx' Not getting the results I would like. Any ideas? Thank you. RB
javascript can set a timer. I dont remember, because I find other ways to do these things, but its like window.setTimer and window.setTimeout that will do your page refresh. This will also force a postback. Maybe you should keep a flag in the session and the refresh page can check it in the postback and query if necessary 1 line of code equals many bugs. So don't write any!! -- modified at 15:47 Friday 30th December, 2005