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 Display Modes
  #1 (permalink)  
Old January 3rd, 2006, 08:59 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default javascript popup keeps loading

Hi could somebody tell whats wrong in the following script this popup keeps loading when showed


<script language='javascript'>
var newwindow;
newwindow=window.open('name','height='+lngHeight+' ,width='+lngWidth+'left=0,top=0,resizable=no,scrol lbars=no,toolbar=no,status=yes');
newwindow.document.write('<head><title>Link</title><style>input{width:700px;}</style></head><body topmargin=0 leftmargin=0 scroll="&chr(34)&"no"&chr(34)&"><input type=text value="default;">');
</script>

__________________________________________________ ________
This is my junk I'm gona eat it
Reply With Quote
  #2 (permalink)  
Old January 3rd, 2006, 09:08 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 Posts
Default

Shouldn't the first argument to open be a URL or an empty string?

I'm not sure what "keeps loading means" but after finishing writing the HTML, and closing the body and html elements you should call document.close():
Code:
newwindow.document.close();
--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old January 3rd, 2006, 09:22 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thank you
newwindow.document.close(); did the trick

and yes it was a bit sloppy the html and body needed to be closed

__________________________________________________ ________
This is my junk I'm gona eat it
Reply With Quote
Reply


Thread Tools
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
javascript popup does not stay on top billbillbill Classic ASP Basics 0 July 23rd, 2007 12:15 PM
Javascript in popup. rupen Javascript 0 April 27th, 2006 08:34 AM
Popup window from javascript arnabghosh Javascript How-To 1 March 2nd, 2006 09:17 AM
Popup window from Javascript arnabghosh Javascript 3 March 1st, 2006 12:09 AM
Javascript popup window with ASP variable johnnycorpse Classic ASP Databases 2 February 24th, 2005 12:17 PM



All times are GMT -4. The time now is 06:24 PM.


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