Folks,
I want to refresh my child window after a particular interval of time, its working with the following code, but after getting refresh its always forward me on first URL not on the current state of the child site. Below is the code for your reference. -
<html>
-
-
<script>
-
-
var limit="0:10";
-
var childWindow = null;
-
-
if (document.images){
-
var parselimit=limit.split(":");
-
-
parselimit=parselimit[0]*60+parselimit[1]*1;
-
}
-
-
function beginrefresh(){
-
if (!document.images)
-
return;
-
-
if (parselimit==1){
-
window.location.reload();
-
alert('1');
-
newwin();
-
}
-
else{
-
parselimit-=1;
-
curmin=Math.floor(parselimit/60);
-
cursec=parselimit%60;
-
if (curmin!=0)
-
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!";
-
else
-
curtime=cursec+" seconds left until page refresh!";
-
window.status=curtime;
-
setTimeout("beginrefresh()",1000);
-
}
-
}
-
-
-
function newwin()
-
{
-
-
if(childWindow ==null){
-
childWindow = window.open('http://www.hsbc.co.in','Childwindow','status=0,toolbar=0,menubar=0,resizable=0,scrollbars=1,top=50 ,left=50,height=375,width=650');
-
}
-
-
-
}
-
-
function checkChildURL(windowObject) {
-
var url = "error";
-
try {
-
url = windowObject.location.href;
-
} catch(e) {
-
// we don't actually catch anything, we just want to stop the error from throwing
-
}
-
alert(url);
-
}
-
-
-
-
window.onload=beginrefresh
-
-
</script>
-
</html>
2 4968
Welcome to TSDN.
Use Code Tags while you do Post.
If you want to refresh the child window then try this. -
childWindow.location.reload();
-
Good Luck.
Kind regards,
Dmjpro.
pbmods 5,821
Recognized Expert Expert
Heya, Ajain. Welcome to TSDN!
Please use CODE tags when posting source code:
[CODE=javascrip t]
JavaScript code goes here.
[/CODE]
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Martin |
last post by:
I have a web page (IE only; intranet only) that is both wider and
longer than the browser window. I've noticed that if the user has
scrolled the page DOWN and then refreshes the page, the new page
automatically scrolls down to same position. However, this automatic
scrolling does NOT happen if the user has scrolled over towards the
right side.
Is there a setting that needs to be adjusted to get this to happen? Or
something I need to do...
|
by: MEM |
last post by:
Hello,
I'd like to refresh the main or top most browser window from a child
window. Specifically, child popup A is opened by a main browser window
then child popup B is opened from within child popup A.
How do i refer to the very first parent window?
Visual...
|
by: James Spibey |
last post by:
Hi,
I have an MDI application which has aboout 10 child windows. The way
the app needs to work is that only one window should be visible at a
time and it should be maximized within the parent window. I have set
all my child windows to be WindowState.Maximized but after showing 2
or 3 windows, the windows all drop back to Normal state.
I have tried various things to overcome this inclusing overriding
OnResize etc but none seem to give...
|
by: Raj |
last post by:
Hi All,
I have a problem with trying to refresh the parent window from
child window in order to update data in the parent window.
The sequence of events are
1) I click a button in the parent window to open a child window thru
javascript
window.open
2) I have some functionality in the child window that changes the data
|
by: Brad White |
last post by:
Overview:
I have a custom web app that has an 'Inbox' that refreshes every 30 seconds.
One user uses Outlook to host the web page.
Using IE, the refresh works fine. If the user is working in another window,
the
web page quietly refreshes in the background.
Hosted in Outlook, the refresh causes Outlook to come to the front on
every refresh. Or in XP, causes the toolbar icon to flash.
| |
by: Charles Law |
last post by:
For some reason, when I click the X to close my MDI parent form, the action
appears to be re-directed to one of the MDI child forms, and the parent
remains open. I am then unable to close the application.
What should happen, is that the main MDI form should close, taking the child
forms with it. There is code to loop through the child forms, remove the
controls on each of them, and then close the form, but this code should
execute only...
|
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
|
by: Natygan |
last post by:
Hi,
I've got a Web page which can become a parent window : some links use "window.open" to open the desired link into a new child window.
This parent window has got an auto-refresh functionality (<meta http-equiv="refresh" content="60">).
My point is that when I'm looking at the child window, I don't want the parent window to take the focus when refreshing.
Does anybody have an idea ?
Thanks !
|
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...
|
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...
|
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...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |