By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,120 Members | 1,799 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,120 IT Pros & Developers. It's quick & easy.

weird window.open in Netscape 7.1

P: n/a
Hi,

I'm a beginner working thru the javascript tutorial at htmlgoodies.com.

The following works on netscape 7.1 and IE:
************************************************** *
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE>Testing html and javascript</TITLE>
<script type="text/javascript">
function open_win()
{
window.open("opened.html","joe",config="height=300 ,width=300");
}
</script>
</HEAD>
<BODY>
<H1>TESTBED</H1>
<form>
<input type="button" value = "Open Window"
onClick = "open_win()">
</form>
</BODY>
</HTML>
************************************************** **********
The following works on IE but not netscape 7.1 (it brings up the main window
but not the one window.open is supposed to open).
************************************************** *********
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE>Testing html and javascript</TITLE>
</HEAD>
<BODY>
<H1>TESTBED</H1>
<script type="text/javascript">
window.open("opened.html","joe",config="height=300 ,width=300")
</script>
</BODY>
</HTML>
************************************************** **
I hope this isn't something really obvious.

What am I missing?

Thanks.

Ken
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 6 Aug 2004 09:27:11 -0700, ken quirici wrote:
What am I missing?


Dunno.. I got both to work on both NN 4.8
and Moz 1.3 (did not bother trying with IE).

The only real difference I noticed was that
one document is valid while the other is not.
Ironically it is the one that does not validate
that works OK for you.

The only other difference I could see that
might affect the way the JS is parsed is
that the second statement does not end in
a ';'. This should not prevent the statement
from being executed AFAIK, but I'd try it if
no other explanations ..pop-up. ;-)

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2

P: n/a


ken quirici wrote:

The following works on IE but not netscape 7.1 (it brings up the main window
but not the one window.open is supposed to open).
************************************************** *********
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE>Testing html and javascript</TITLE>
</HEAD>
<BODY>
<H1>TESTBED</H1>
<script type="text/javascript">
window.open("opened.html","joe",config="height=300 ,width=300")
</script>
</BODY>
</HTML>
************************************************** **
I hope this isn't something really obvious.

What am I missing?


As a lot of web sites use window.open to open popup windows with ads or
other things the browser user is not interested in newer browsers like
Netscape 7.1 can be configured to block unrequested popup windows opened
by window.open. IE 6 SP 2 (or maybe IE 6 as patched by Windows XP SP 2)
will also allow users to block unrequested popup windows.

If it is your Netscape browser you want to reconfigure look under
Edit -> Preferences -> Privacy & Security -> Popup Windows
where you can either allow all popups or you can setup a list of sites
from which to allow popup windows.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #3

P: n/a
*ken quirici* wrote:
Hi,

I'm a beginner working thru the javascript tutorial at
htmlgoodies.com.

The following works on netscape 7.1 and IE:
[pop-up triggered from as result of a user action]
The following works on IE but not netscape 7.1 (it brings up the main
window but not the one window.open is supposed to open).
[pop-up triggered as document is loaded]
I hope this isn't something really obvious.
What am I missing?


Install the Google toolbar for IE, open the Google toolbar options and
ensure that the 'Popup Blocker' option is enabled - this will ensure
that both Netscape 7.1 and IE exhibit the same behaviour when it comes
to pop-ups ;-)
--
Andrew Urquhart
- FAQ: www.jibbering.com/faq/
- Contact me: http://andrewu.co.uk/contact/
- This post is probably time-stamped +1 hour - blame my ISP (NTL)
Jul 23 '05 #4

P: n/a

Hi Martin,

That worked! Thanks a lot - that was holding up the
path of progress. :-)

Ken Quirici
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.