I forgot to mention this variation on my machine also solves the problem you
mention of the parent page poping up over your popup window.
Dont forget there is a javascript bug (or design feature) which when trying
to open up a popup window that is already open, nothing seems to happen(ie
the popup doesnt get focus and can remain hidden behind the parent window)
you gotta love programming on the web some days ;)
Casey
------------------------------------------------------------------
Wow, well I tested your problem and receieved a variation of the problem you
described.
I used the following code to get around the Page reloading issue:
<script language="JavaScript">
<!--
function openWindow(url, name, rs, w, h)
{
var resize = "";
if (rs) {resize = "resizable,";}
popupWin = window.open(url, name, 'scrollbars,menubar,' + resize +
'width=' + w + ',height=' + h);
}
// -->
</script>
<BODY>
<a href="javascript:;" onclick="openWindow('hello.htm', 'test', true, 200,
50) ">ack</a>
...........
Having another page reference within the href parameter seems to be enough
to cause the window to reload. I am at a loss to explain this behavior. For
a solution you can use the onclick event to bypass the issue. Also note You
must supply href with some parameter to initiate the link behavior of the
anchor tag, so you can use the ="javascript:;" as a dummy value.
It is interesting to watch tomcat reload the parent page. definately not
what i would expect.
Casey Kochmer
[EMAIL PROTECTED]
>From: David Castro <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: A different JavaScript/JSP question
>Date: Mon, 12 Jun 2000 13:01:48 -0700
>
>I have the following JavaScript inside of a .JSP file:
>
><a href="javascript:window.open
>('../Glossary/G_Sequence.htm', 'glossary',
>'width=300,height=200,scrollbars')">
>
>When the file is served by the Tomcat server to my Win98 machine running
>IE5.0,
>and I click the link, the JavaScript does open the window with the file in
>it,
>but a File Download window opens, with the the following error over it:
>
>"Internet Explorer cannot download P_Adding_appointments.jsp from
>window.open('...
>
>Internet Explorer was not able to open this Internet site. The requested
>site
>is either unavailable or cannot be found. Please try again later."
>
>The JavaScript is just loading a standard HTML page into the secondary
>window.
>Why is it trying to reload the originating page (the .JSP file)?
>
>Is there a different way I can do the JavaScript that won't cause this
>problem?
>I originally had this done as <a href="#" onClick="window.open...., but
>that
>causes the parent window to pop back up to the top of the page, which is
>also
>undesirable.
>
>Any advice is greatly appreciated.
>
>-David Castro
> [EMAIL PROTECTED]
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Photos -- now, 100 FREE prints!
>http://photos.yahoo.com
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets