Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to cause an iframe to refresh?

    Hello

    asumming I have an IFrame in my code.
    Is there a way of causing it to refresh in JavaScript as a result of some event?

    thanks
    For example:
    Code:
    <iframe src="test.php" name="testFrame" id="testFrame" width="100" height="343"></iframe>
    <input type="button" onclick="document.getElementById('testFrame').refresh();">
    Of course this doesn't work... I am looking for the correct way of doing it...

    thanks in advance

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <a href="Javascript:window.frames['frame_name'].reload(true)" ...>

  • #3
    New Coder
    Join Date
    Mar 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the following works for me:
    Code:
    document.frames['testFrame'].location.reload(true);
    thanks for your help

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    where do you call that from (don't say a link - i mean, which frame)?

    sorry, didn't really read your original thread. you're using iframes, thought it was a full frameset.
    Last edited by jbot; 07-15-2004 at 12:45 PM. Reason: added the bit about the iframes

  • #5
    New Coder
    Join Date
    Mar 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My code is more complex than that.
    I am actually calling it from a different iframe in the same page.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •