er,

However, (as in I just remebered something), I have seen something done in
IE browsers where you can recieve a response from the server directly into a
JavaScript variable. It seems to be MS  IE specific stuff, here is some
sample code:

<msie:download id=downloader style="BEHAVIOR:
url(#default#download)"></msie:download>

<SCRIPT language=JavaScript>
<!--
function serverCall ( url )
{
    downloader.startDownload ( url, displayResult );
}

function displayResult(text)
{
    alert ( text );
}
//-->
</SCRIPT>

This does not directly solve your problem, but in theory you could send your
entire page's HTML into a JS variable this way, perhaps with a pre-prended
string explaining where it should go. Then in JS you strip this destination
string off (obviously) and write the HTML out to the destinition window
(perhaps opening it if neccessary)

Cool Huh?
Adrian

> -----Original Message-----
> From: Adrian Janssen
> Sent: 12 September 2002 04:02
> To:   [EMAIL PROTECTED]
> Subject:      Re: open page in new frame
>
> New windows have to, in some way, be opened from html (incliding
> javascript).
>
> So it's  best if you can rig things up such that you know in advance
> whether
> hyperlinks, form posts or javascript "window.open"-s  must open ina new
> window or not.
>
> It is too late, as a general principle, to try to decide this in the
> servlet.
>
> Cheers
> Adrian
>
> > -----Original Message-----
> > From: Christopher Doyle [SMTP:[EMAIL PROTECTED]]
> > Sent: 12 September 2002 03:46
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: open page in new frame
> >
> > Is there a way to now write to this new window from the servlet? In
> other
> > words, can I open the window _and_ generate the page that appears in it
> > from
> > the same servlet?
> >
> > Chris Doyle
> > [EMAIL PROTECTED]
> >
> >
> > ----- Original Message -----
> > From: "Andreas Schlegel" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, September 12, 2002 9:25 AM
> > Subject: Re: open page in new frame
> >
> >
> > > I find a JavaScript solution:
> > >
> > > out.append( "<script>\n" );
> > > out.append( "  window.open(location.href='" + myURL + "', 'newFrame',
> > > '');\n" );
> > > out.append( "</script>\n" );
> > >
> > >
> > > Raghupathy, Gurumoorthy wrote:
> > >
> > > >just use <a href="the url" target="windowname">
> > > >
> > > >or <form action="the url" target="windowname">
> > > >
> > > But both ways require a user action, isn't it? A click on the link or
> on
> > > a button ...
> > >
> > > >
> > > >
> > > >guru
> > > >
> > > >-----Original Message-----
> > > >From: Andreas Schlegel [mailto:[EMAIL PROTECTED]]
> > > >Sent: 12 September 2002 12:07
> > > >To: [EMAIL PROTECTED]
> > > >Subject: OT: open page in new frame
> > > >
> > > >
> > > >Hi,
> > > >
> > > >I am looking for a way to open a page in another frame automatically.
> > > >This should happen by calling a servlet not a static page.
> > > >
> > > >Im my servlet application I already tried the following solutions but
> > > >without success:
> > > >
> > > >out.append( "<META HTTP-EQUIV='Window-Target' CONTENT='newFrame'>\n"
> );
> > > >out.append( "<meta http-equiv='refresh' content='1; URL=" + myURL +
> > > >"'>\n" );
> > > >
> > > >or:
> > > >
> > > >out.append( "<script>\n" );
> > > >out.append( "  window.open('" + myURL + "', 'newFrame', '');\n" );
> > > >out.append( "</script>\n" );
> > > >
> > > >I suppose the JavaScript doesn't run because I don't know to get a
> > valid
> > > >URL calling the servlet in this code.
> > > >
> > > >Any ideas?
> > > >
> > > >Greetings,
> > > >Andreas
> > > >
> > >
> >
> >_________________________________________________________________________
> > __
> > > >To unsubscribe, send email to [EMAIL PROTECTED] and include in
> the
> > body
> > > >of the message "signoff SERVLET-INTEREST".
> > > >
> > > >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > >Resources:
> http://java.sun.com/products/servlet/external-resources.html
> > > >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > > >
> > >
> >
> >_________________________________________________________________________
> > __
> > > >To unsubscribe, send email to [EMAIL PROTECTED] and include in
> the
> > body
> > > >of the message "signoff SERVLET-INTEREST".
> > > >
> > > >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > >Resources:
> http://java.sun.com/products/servlet/external-resources.html
> > > >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > > >
> > > >
> > >
> > >
> >
> __________________________________________________________________________
> > _
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
> http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> > >
> >
> >
> __________________________________________________________________________
> > _
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> --
>
> It is the strict policy of Truworths that its e-mail facility and all
> e-mail communications emanating therefrom, should be utilised for
> business purposes only and should conform to high professional and
> business standards.   Truworths has stipulated certain regulations in
> terms whereof strict guidelines relating to the use and content of
> e-mail communications are laid down. The use of the Truworths e-mail
> facility is not permitted for the distribution of chain letters or
> offensive mail of any nature whatsoever.   Truworths hereby distances
> itself from and accepts no liability in respect of the unauthorised
> use of its e-mail facility or the sending of e-mail communications
> for other than strictly business purposes.   Truworths furthermore
> disclaims liability for any  unauthorised instruction for  which
> permission was not granted.    Truworths Limited accepts no liability
> for any consequences arising from or as a result of reliance on this
> message unless it is in respect of bona fide Truworths business for
> which proper authorisation has been granted.
>
> Any recipient of an unacceptable communication, a chain letter or
> offensive material of any nature is requested to notify the Truworths
> e-mail administrator ([EMAIL PROTECTED]) immediately in order that
> appropriate action can be taken against the individual concerned.
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--

It is the strict policy of Truworths that its e-mail facility and all
e-mail communications emanating therefrom, should be utilised for
business purposes only and should conform to high professional and
business standards.   Truworths has stipulated certain regulations in
terms whereof strict guidelines relating to the use and content of
e-mail communications are laid down. The use of the Truworths e-mail
facility is not permitted for the distribution of chain letters or
offensive mail of any nature whatsoever.   Truworths hereby distances
itself from and accepts no liability in respect of the unauthorised
use of its e-mail facility or the sending of e-mail communications
for other than strictly business purposes.   Truworths furthermore
disclaims liability for any  unauthorised instruction for  which
permission was not granted.    Truworths Limited accepts no liability
for any consequences arising from or as a result of reliance on this
message unless it is in respect of bona fide Truworths business for
which proper authorisation has been granted.

Any recipient of an unacceptable communication, a chain letter or
offensive material of any nature is requested to notify the Truworths
e-mail administrator ([EMAIL PROTECTED]) immediately in order that
appropriate action can be taken against the individual concerned.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to