473,789 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto Refresh page

2 New Member
Hi,

I need to auto refresh a page after a specific time interval. When the page is accessed the first time, a request parameter is null and hence it gets redirected to a welcome page (static html). When user clicks on a link from the left menu, i take the ID passed during the click and the page is redirected to a jsp that has information specific to that ID. Now, when i write a script to refresh this page (with some info), the ID is lost and hence the user is taken to the welcome page (static html).

I tried using the <meta > tag for refresh, but facing the same issue. I have also tried the window.location .replace and window.location .href in the script but both throw a alert message when the page refreshes ("you are transferring info ...blah...blah. ..Retry ? Cancel"). I need to avoid this. I need help in this regard.

thanks,
tinu
May 3 '07 #1
3 9365
acoder
16,027 Recognized Expert Moderator MVP
The meta refresh should work (I think).

Post your code.
May 3 '07 #2
dilipananth1984
3 New Member
The meta refresh should work (I think).

Post your code.
[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@ page language="java" contentType="te xt/html; charset=ISO-8859-1"
pageEncoding="I SO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache. org/tomahawk" prefix="t"%>
<f:loadBundle basename="messa ges" var="msg" />
<LINK rel="stylesheet " type="text/css"
href="../theme/DashBoardStyle. css" title="Style">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="refresh" content="3">
<f:verbatim>
<title>Welcom e</title>
</f:verbatim>

<f:verbatim>
<table align="left" border="0" width="100%" cellpadding="0" cellspacing="0" >

</f:verbatim>
<h:form id="welcomeOne" >
<f:verbatim>
<tr>



<td width="75%" style="margin-left: 10px" align="center">
<table width="100%" border="0">
<tr align="left" valign="top">
<td align="left">
</f:verbatim>
<%
String dashboardId = request.getPara meter("dashBoar dID");
String path = null;

if(dashboardId == null) {

%>
<f:subview id="dashboard_i ncluded_page">
<jsp:include page="welcome.j sp" flush="true"/>
</f:subview>
<%
} else {
com.proj.Applic ationProperties properties = new com.proj.Applic ationProperties (com.proj.Commo nConstants.APPL ICATION_PROPERT IES);
String URL = properties.getP roperty(com.pro j.CommonConstan ts.DASHBOARD_UR L);

%>
<f:verbatim>
<iframe src ="<%= URL %><%=(String) request.getPara meter("dashBoar dID")%>"
marginwidth="10 0px" height="1000" frameborder="0" scrolling="auto " width="100%">
</iframe>
<input type="hidden" name="dashBoard ID" value="<%= request.getPara meter("dashBoar dID")%>" />
</f:verbatim>
<%
}
%>
<f:verbatim>
</td>
</tr>
</table>
</td>
</tr>
</f:verbatim>



<f:verbatim>


<tr>
<td height="20"></td>
</tr>
</f:verbatim>
</h:form>
<f:verbatim>
</table>
</f:verbatim>[/HTML]
May 4 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
You can also use
Expand|Select|Wrap|Line Numbers
  1. window.location.reload();
May 4 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
12925
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a recordset table on the 2nd graph page and because the user gets to it by clicking the graph, the page doesn't properly post to render the recordset table. I can click "Refresh" on 2nd page and table displays fine. Is there an ASP refresh command that...
1
34322
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like the page to auto-refresh every 4 seconds....if the user un-checks the checkbox, I'd like to turn off the auto refresh. The page is as follows:
3
487
by: blu3g85 | last post by:
how to redirect a page? as in after a few sec, the page will auto direct u to another page. ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
2
1805
by: MattB | last post by:
I have a page I've migrated from HTML to asp.net that would auto-refresh every 30 seconds. I did this by putting the following in the <head> section: <meta name="refresh" content="30"> But now that it's an aspx page it doesn't seem to refresh anymore. Is there an asp.net equivalent to this or some kind of adjustment I need to do to make it work? Thanks! Matt
7
22748
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would be appreciated. Thanks, Brian
4
10032
by: jack-e | last post by:
How do I auto refresh a page a particular time of the day?
3
3611
by: lezzo | last post by:
Hi Guys, I am new to this forum and find very interesting. I need your help in one of the script. I got a MySQL table bid_amount, and i want that if some new data comes in this table and where the table data is shown on webpage, that webpage need to be auto refresh. To make it more easy to understand
1
3026
by: BibhuAshish | last post by:
hi, I have designed a jsp page. This jsp is able to auto refresh after 5 second. But i want after 5th times of auto refreshment the table present inside the body should change. Can anybody help me out. My code is :: <%@ page import = "example.*, java.util.*, javax.servlet.http.*" %>
2
2916
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a web page that has a TreeView on it. If I DONT'T expand the TreeView nodes, the auto refresh works nicely: my page gets refreshed every minute. As soon as I expand a node on the TreeView, the page stops auto-refreshing. Any ideas why this is happening? I have acheived auto refresh using the following:
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.