?
Solved

reloading content in an iframe from jquery

Posted on 2010-11-24
5
Medium Priority
?
534 Views
Last Modified: 2012-05-10
Hello,

I have two pages the main page and the iframe page (video.php).  I would like to refresh only the iframe page from link on the main page without refreshing the main page.  Is that possible?

main page housing the iframe:
<div id="tabs-5">
    <div id="container5" class="demo ui-widget ui-helper-clearfix" style="background- color:#FFEEFF;width:1100px;">
         <iframe width="1100px;" height="500;" align="left" frameborder="0" src="/youtube/video.php"></iframe>
    </div>
</div>

Open in new window

0
Comment
Question by:cgray1223
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34209529
sure --

window.iframename.reload
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34209537
or document.iframename.reload.

You can also reload the link -- <A href="video.file" target="iframename">
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34209542
oops, I see you have not NAMED your iframe.  It MUST have a name = iframename parameter, and you address that directly -- if you address the DIV nothing will happen, because DIVs do not control iframes and really should not enclose them, except for positioning.
0
 

Author Comment

by:cgray1223
ID: 34209646
Thanks for the suggestion.  For some reason I had to use the below.  The suggestion you gave me threw a JS error saying that property wasn't supported by the object.  I thought the code below and what you suggested is basically the same thing, right?

window.frames["frameName"].location.reload();      
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 2000 total points
ID: 34209820
yes -- in some cases you have to tell it it is part of the Frames object, sorry I should have mentioned that, but yes, it is the same code addressing the same iframe.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question