Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 21st, 2003, 04:49 PM
Registered User
 
Join Date: Jul 2003
Location: , NJ, USA.
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
Reply With Quote
  #2 (permalink)  
Old July 22nd, 2003, 07:11 AM
Registered User
 
Join Date: Jul 2003
Location: Budapest, , Hungary.
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
Reply With Quote
  #3 (permalink)  
Old March 2nd, 2007, 06:47 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
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*/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.