I discovered why it wasn't working:  I was running the test .html from a
webserver on host1.  The servlet is running on host2.  Then I ran the
test.html from host2, it ran flawlessly.

So, my question is: Is there a way to return window data from a servlet
running on host2  to the window.opener .html on host1?  Fortunately, I don't
really need to, but just in case.

Thanks for the advice.

-ron

Carsten Heyl wrote:

> Hi Ron,
>
> their is nothing special with a servlet or jsp page returning
> html compared with the web server returning a static  html page.
> So if your example works with a static html page it
> will work with a servlet ot jsp page.(I don't know javascript,
> so I don't know if it contains errors.)
>
> >Hello,
> >
> >This is acually a servlet question, but if the answer is what I think it
> >is, then it becomes a jsp question.
> >
> >I have a javascript  file which calls a java servlet in a window, i.e.:
> >
> >window.open (url to servlet, blah, blah)
> >
> >The following javascript is created by the servlet to return values into
> >the form of the "window.opener" .html (I left out the "out.println" for
> >easier reading):
> >
> ><script language='javascript'>
> >var codeData, textData, numberData;
> > function closeThisWindow(codeData, textData, numberData) {
> >  if (numberData == '1') {
> >   window.opener.document.forms[0].naics1.value = codeData;
> >   window.opener.document.forms[0].naicsText1.value = textData;
> >  }
> >  window.close();
> > }
> ></script>
> >
> >I get an error "access denied" in Internet Explorer.  Netscape navigator
> >just says 'javascript error'.  I saved the .html which was created by
> >the servlet in the window, and modified the original .html to call the
> >servlet-created .html, just to test.  Same data, but it works.  So, my
> >question is:  can a servlet return data into form fields from a window?
> >If not, can I accomplish the same goal using jsp?
> >
> >Thanks, much.
> >
> >-ron
> >
> >--
> >
> >Ron Parker
> >SCBBS / TradeWinds / TradePoint LA
> >
> >http://www.scbbs.com
> >http://www.intl-trade.com
> >http://www.tradepointla.org
> >
> >
>
> Ciao,
>         Carsten

--
Ron Parker
Software Creations            http://www.scbbs.com
TradeWinds Publishing         http://www.intl-trade.com
TradePoint Los Angeles        http://www.tradepointla.org
SiteDirector Security Server  http://livepublish.scbbs.com
Civil War Online Library      http://civilwar.scbbs.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to