Solved

MEta Refresh for cross browser

Posted on 2004-08-03
6
482 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Tool to Build Android and iOS App 3 53
Change month dropdown 5 34
Problem with a CSS in a page 2 26
insert text field data into html script 13 22
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

912 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

21 Experts available now in Live!

Get 1:1 Help Now