473,412 Members | 3,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Refresh an iframe from a link on the parent page

1
How do I refresh an iframe from a link on the parent page?

This button (posted by Marss on this forum) does exactly what I need. But I want this to happen from a link, not a button. The button Marss wrote:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4.  
  5. function Reload () {
  6. var f = document.getElementById('iframe1');
  7. f.src = f.src;
  8. }
  9.  
  10. </script>
  11. </head>
  12. <body>
  13. <iframe id="iframe1" height="200" width="300"
  14. src="http://google.com"></iframe>
  15. <br>
  16. <input type="button" value="Reload" onclick="Reload();">
  17. </body>
  18. </html>
The link I have now:

Expand|Select|Wrap|Line Numbers
  1. <a href="tshirt.html#bottom">1</a>
Can this be done? Please tell me how. (I write simple HTML and a little scripting.)

Micka
Nov 19 '11 #1
3 4522
zorgi
431 Expert 256MB
Expand|Select|Wrap|Line Numbers
  1. <a href="#" onclick="Reload();">Reload</a>
Nov 21 '11 #2
acoder
16,027 Expert Mod 8TB
Something like this:
Expand|Select|Wrap|Line Numbers
  1. <a href="tshirt.html#bottom" onclick="Reload(); return false;">1</a>
Edit: posted a few seconds after Zorgi...
Nov 21 '11 #3
DaveRook
147 100+
the input type button doesnt have to display as a button though? You can easily use some CSS to make it appear as normal text. would that work?
Nov 25 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: SF RVN | last post by:
Hmmmm.. a wee bit of a problem: Background default.htm has a left-aligned table serving as a 'navigation menu' and a right-aligned iFrame (named 'viewframe') serving as the 'target' for...
1
by: Lubo¹ ©lapák | last post by:
Hi, Can I, after click on button, from Iframe in aspx page refresh this whole aspx page? Thanks Lubos.
2
by: MLibby | last post by:
How can an IFrame's aspx page force a server-side redirect on its parent page? Typically, an IFrame's client-side javascript specifies '_top' to change the parent page... ...
6
by: PD | last post by:
I have a parent .Net page (http://mywebsite/project.aspx) that has an iframe (http://iframe/iframe.aspx) which are on seperate domains. I need to adjust the scrolling on the parent window due the...
4
by: Jayyde | last post by:
Is there any way to capture a button click inside an iFrame and perform both an action on that page and one on the parent page? Basically I have a page atm that allows the user to add a record to...
1
by: govindsharma53 | last post by:
Hi, i read your article on refreshing parent page from iframe on page_load . http://www.thescripts.com/forum/thread299739.html I tried to implement this in my project but it gives me error...
2
by: knkk | last post by:
I have an iframe in a page (with a name to the iframe), and in that iframe I have several anchors <a name="something"> There are links in the iframe that look like <a href="#something"> ...
3
by: jagann2007 | last post by:
Hi all, I have a webpage with an IFRAME in it. But some of the pages on my IFRAME which has forms which are really long. So, I want a script or a html code whereby I can scroll to the top of...
0
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in...
1
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.