Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2003, 04:49 PM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Aleksandra Send a message via Yahoo to Aleksandra
Default Window refresh and window pop up in Java Script

HI,

I am new to Java Script.
1.Is there any window.refresh() function which will let me refresh a certain page?

2.Can you please tell me how to pop up a window using JScript by triggering with a variable (instead of using onClick, onLoad,...)?

Any help is appreciated
Thanks,


Aleksandra
 
Old July 22nd, 2003, 07:11 AM
Registered User
 
Join Date: Jul 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lillu
Default

Hi Aleksandra,

1. Yes, there is. Take a look at this page: http://grizzlyweb.com/webmaster/javascripts/refresh.asp

2. Place this between <head> ... </head> tags.

<script language="javascript">
function popupWindow()
{
newWin=window.open('some_page.htm','newWin','toolb ar=no,location=no,directories=no,status=no,menubar =no,scrollbars=no,resizable=no,width=300,height=20 0,top=100,left=100')
}
</script>

Adjust the properties to your needs.

  Place this between <body> ... </body> tags.

(Call the window from some element on your page: a link, image, etc.)

<a href="javascript:popupWindow()">Popup Window</a>

HTH,

Lillu

The Purple Couch
http://www.geocities.com/lillamarta
 
Old March 2nd, 2007, 06:47 PM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't user window.location.reload(), it doesn't return a value until after the reload completes, which is a problem if say for example you are doing the following, as i did

Code:
afterSave = function(){
    opener.focus();
    opener.location.href=opener.location.href;
    close();
}/*if I had used opener.location.reload(); then the popup window running the function would not run the 3rd command close() until after the opener was completely reloaded*/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Pop Window testsubject General .NET 1 July 2nd, 2006 01:29 PM
pop-up window rajiv_software Classic ASP Basics 1 April 12th, 2005 06:11 AM
pop up window sankar VB How-To 0 July 29th, 2003 01:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.