Solved

Load An iFrame without having a history

Posted on 2004-04-15
8
2,291 Views
Last Modified: 2012-05-04
Hi guys, I wonder if i can disable the page history in iFrames..

I have a Main.asp
in this page, there is a iFrame that calls another URL

When the iFrame loads another page (e.g. DeleteWorkSpace.asp),
it would save DeleteWorkSpace.asp into the history which i dun want it to happen.

Is there a solution?

-------------------------------------------------------------------------------------------------------------
Below is my IFrame :

<iframe name='contentFRM3' id='contentFRM3' width='0%' height='0%' frameborder='0' scrolling='no' frameSpacing='0'></iframe>
<div id='contentLayer3' style='position:absolute; width:345px; height:115px; z-index:1; left: 186px; top: 304px'></div>


And I use javascript to load an page into that iframe :

document.getElementById('contentFRM3').src = "deleteWS.asp"

---------------------------------------------------------------------------------------------------------------

How am i gonna write to disable the page history from being load?

I've used
<%
      response.Expires = -1
      response.Expiresabsolute = Now() - 2
      response.AddHeader "pragma","no-cache"
      response.AddHeader "cache-control","private"
      response.CacheControl = "no-cache"
%>
but its useless, its still stores the history.....

Hope u guys can help me, thanX.


0
Comment
Question by:FantasyEx
8 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 10831589
Did you try:

document.getElementById('contentFRM3').location = "deleteWS.asp"

0
 
LVL 5

Expert Comment

by:alambres
ID: 10832066
document.getElementById('contentFRM3').location.replace("deleteWS.asp");
0
 
LVL 5

Expert Comment

by:alambres
ID: 10832106
better :

<body onunload="document.getElementById('contentFRM3').location.replace('about:blank');">

location.replace(newURL)  does not add newURL to history just overwrite the previous, if you overwrite the current url for the iframe with another  it disappear from the navigation history
0
 
LVL 25

Accepted Solution

by:
devic earned 250 total points
ID: 10836580
<%

   Response.CacheControl="no-cache"
   Response.AddHeader "Pragma","no-cache"
   Response.Expires=0

%>
for me this works fine.
0
 
LVL 3

Expert Comment

by:robotman757
ID: 10838428
I agree with devic. Plus it is all ASP which I think is better in this case...IMHO

Dan
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to refer to value 8 50
How do specify keydowns in JavaScript 3 47
Getting selected value of a dropdown with jquery 7 40
Javascript Form Change 5 23
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

832 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