If you mean "browserwindow" with "browser" you still have the same session,
but if you have two BROWSERS, then it's hard ;)

I don't know what you want to do exacly but let say this.

You have page1 in browserwindow1
>From page1 you would like to open page2 in a new window (browserwindow2).
In page2 you fill in a form and submit it, save it in the session and
reloads the page1 to "automatic" fill in the form using the session.

The tricky here is to submit page1 when page2 is submitted, this you do with
javascript.

function ignore()
{
  return true;
}

function submitPage1()
{
        window.onerror=ignore;
        eval("window.opener.document.myForm.mySubmitButton.submit");
        self.close();
}

If any error we catch the error message... SO if it's not working you can
comment window.onerror=ignore; and your browser will display the error as
normal...

If you do not wish to submit the page you can easily update the form
direct...

function ignore()
{
  return true;
}

function returnToField(pField, pValue)
{
        window.onerror=ignore;
        eval("window.opener.document.myForm."+pField+".value="+pValue);
        self.close();
}

By calling the function from a button or anything...

<input type="button" OnCLick="returnToField('name', 'Ior');" value="press
me">

This will return "Ior" to the field name in form myForm on the page that
opened this one...

Hoped you got something out from this...

//Jan

> -----Ursprungligt meddelande-----
> Från: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]För randie ursal
> Skickat: den 2 oktober 2002 09:46
> Till: [EMAIL PROTECTED]
> Ämne: Opening new IE Browser with "target=_top"
>
>
> hi guys,
>
>     i have this question.
>
>     if im going to pop out another browser from where i am
> currently log-in
>     would i still have that same session?
>
>    because what i did was i have a servlet that accept the
> request from one
>    browser then output it on another browser, then on that new browser
>    i want to send a request back to my servlet to get updated data.
>
>    would this works as if i am requesting like having only one
> browser, were
>    i can retreive information that i set on my Session?
>
>    or, how can i implement this one?
>
> thanks
>   randie
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to