Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

iframe refresh problem

Posted on 2003-11-14
4
Medium Priority
?
828 Views
Last Modified: 2008-03-10
Hi there,

I have a site starting with the page "index.aspx" which contains an iframe and its source is default.aspx (in fact the original start up page is default.aspx, I used iframe just to hide the URL)

while I am browsing other pages linked to default.aspx and click the refresh button, browser goes back to dafeult.aspx.

How can I stay on the current page?

Thanks...
0
Comment
Question by:burakbaysal
[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 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 1000 total points
ID: 9747241
You can't. When you load the page, the content of the iframe is determined by the src attribute. You would have to change the src attribute to change the page loaded when you refresh.

Obscuring the URI is pretty pointless anyway. Anyone who wants to find it can do so with little difficulty, so you just create an annoying barrier for the visitor.
0
 
LVL 31

Assisted Solution

by:seanpowell
seanpowell earned 1000 total points
ID: 9747362
The browser refresh button will always reload the parent frame, not the current src of the iframe. One option you can use would be to include a refresh button in the actual iframe page, displayed prominently so people are likely to use it instead of the browser one. But it's not foolproff obviously.


Each iframe page would have the following, with the form action set the the name of the page:

<html>
<head>
<script language="JavaScript1.2">
<!--
function refresh()
{
    window.location.reload( false );
}
//-->
</script>
</head>
<body>
<form method="GET" action="contacts.htm">
<input type="button" onclick="refresh()" value="Refresh Page" name="mybutton">
</form>
<h1>Contact Us Page</h1>
</body>
</html>
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

704 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