Solved

MEta Refresh for cross browser

Posted on 2004-08-03
6
503 Views
Last Modified: 2008-03-06
I hv this meta tag and the refresh rate I have to take from Servlet and refresh it.  Right now from my servlet I'm getting value of 50 which are in seconds, but seems like this is refreshing every 50 micro seconds NS but working fine in IE

<meta http-equiv="refresh" content="<%=interval%>;url=http://localhost:8080/MSquaredWeb/resource/right_live.jsp">

how to reslove this ??

Thx,
0
Comment
Question by:princehyderabad
[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
  • 2
6 Comments
 
LVL 14

Expert Comment

by:ziffgone
ID: 11711885
Try this in your ASP, although I'm not too familiar with ASP yet, so I may be way off.

Code:
<%
Set objBCap = Server.CreateObject("MSWC.BrowserType")
If objBCap.Browser = "IE" Then
      dim interval = 50
ElseIf objBCap.Browser = "Netscape" Then
      dim interval = 50000
End If
%>

Hope this helps. :)

Regards...
0
 
LVL 14

Expert Comment

by:ziffgone
ID: 11711897
Or a javascript version:

<script type="text/javascript">
if(navigator.appName.substr(0,4) =="Micro"){
   document.write('<meta http-equiv="refresh" content="<%=interval%>;url=http://localhost:8080/MSquaredWeb/resource/right_live.jsp">');
}
else{
   document.write('<meta http-equiv="refresh" content="'+<%=interval%>*1000+';url=http://localhost:8080/MSquaredWeb/resource/right_live.jsp">');
}
</script>

Regards...
0
 

Author Comment

by:princehyderabad
ID: 11718064
Hello Ziffgone,

I tried what your javascript, but still no output. Still NE is going fast and IE is normal....
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Accepted Solution

by:
ziffgone earned 50 total points
ID: 11720676
Are you simply refreshing right_live.jsp with this META refresh? If so, try this:

<script type="text/javascript">
function refreshIt(){
     window.location.href = self.location.href;
}
var interval = <%=interval%>*1000;
setTimeout('refreshIt()',interval);
</script>

If not simply refreshing, but redirecting:

<script type="text/javascript">
function refreshIt(){
     window.location.href = "http://localhost:8080/MSquaredWeb/resource/right_live.jsp";
}
var interval = <%=interval%>*1000;
setTimeout('refreshIt()',interval);
</script>

Hope that helps.

Regards...
0
 

Author Comment

by:princehyderabad
ID: 11721585
Thanks Ziffgone, it worked
0
 
LVL 14

Expert Comment

by:ziffgone
ID: 11723333
No problem, glad to help. :)

Regards...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP get fieds value 2 39
How do I show a login page over the login page? 5 59
.CSS HTML Help 3 57
Can't get video to center on page 2 45
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

732 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