468,771 Members | 1,679 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

Opera doesn't refresh IFrame

hi,
i have the following pages. when form submitted with the field1 value
is "ok" then the iframe must be loaded with the text "Page loaded...".
This works fine with IE 6 and FireFox(1.5) but Opera (9.01) does not
refresh the iframe and loads the page for iframe from the cache, so
refreshing the page gets the iframe refreshed with the new page. If
DisableCaching() function used which disables all kind of caching then
Opera works fine. So, i want to know that if this is the only way to
get the Opera refresh the iframe. Are there any html work around
or javascript solutions for it?.
thanks

---- main.asp ----
<html>
<body>
<%
Session("field1") = Request.Form("field1")
Response.Write(Session("field1") & "<br>")
%>
<iframe name="menu" src="menu.asp" width="200" height="150">
</iframe>
</body>
</html>
---- menu.asp ----
<%
Sub DisableCaching()
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
End Sub
' Call this to disable caching for Opera to refresh the iframe.
' DisableCaching()
%>
<html>
<body>
<%
If Session("field1") <"ok" Then %>
<form method="post" action="main.asp" target="_parent">
<input name="field1" type="text" size="20" />
<input name="field2" type="text" size="20" />
<input type="submit" value="Ok">
</form

><% Else %>

Page loaded...
<% End If %>
</body>
</html>

Aug 8 '06 #1
1 7713

spolsky wrote:
hi,
i have the following pages. when form submitted with the field1 value
is "ok" then the iframe must be loaded with the text "Page loaded...".
This works fine with IE 6 and FireFox(1.5) but Opera (9.01) does not
refresh the iframe and loads the page for iframe from the cache, so
refreshing the page gets the iframe refreshed with the new page. If
DisableCaching() function used which disables all kind of caching then
Opera works fine. So, i want to know that if this is the only way to
get the Opera refresh the iframe. Are there any html work around
or javascript solutions for it?.
thanks

---- main.asp ----
<html>
<body>
<%
Session("field1") = Request.Form("field1")
Response.Write(Session("field1") & "<br>")
%>
<iframe name="menu" src="menu.asp" width="200" height="150">
</iframe>
</body>
</html>
---- menu.asp ----
<%
Sub DisableCaching()
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
End Sub
' Call this to disable caching for Opera to refresh the iframe.
' DisableCaching()
%>
<html>
<body>
<%
If Session("field1") <"ok" Then %>
<form method="post" action="main.asp" target="_parent">
<input name="field1" type="text" size="20" />
<input name="field2" type="text" size="20" />
<input type="submit" value="Ok">
</form

<% Else %>


Page loaded...
<% End If %>
</body>
</html>
I found that problem too and the way I fixed it was, sending a random
number in the querystring. That way Opera will not use the cache

Aug 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by DraguVaso | last post: by
reply views Thread by spolsky | last post: by
3 posts views Thread by Ned Balzer | last post: by
7 posts views Thread by seanmatthewwalsh | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.