|
Subject:
|
javascript popup keeps loading
|
|
Posted By:
|
Dj Kat
|
Post Date:
|
1/3/2006 8:59:23 AM
|
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,scrollbars=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 By:
|
joefawcett
|
Reply Date:
|
1/3/2006 9:08:01 AM
|
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():newwindow.document.close();
--
Joe (Microsoft MVP - XML)
|
|
Reply By:
|
Dj Kat
|
Reply Date:
|
1/3/2006 9:22:18 AM
|
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
|