Solved

iframe refresh problem

Posted on 2003-11-14
4
800 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
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 tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

762 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

6 Experts available now in Live!

Get 1:1 Help Now