?
Solved

MEta Refresh for cross browser

Posted on 2004-08-03
6
Medium Priority
?
516 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
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 
LVL 14

Accepted Solution

by:
ziffgone earned 200 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

Industry Leaders: 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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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 …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

764 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