Solved

iframe refresh problem

Posted on 2003-11-14
4
804 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
4 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 250 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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now