Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-15 Thread Peter Alfors

When you say 'return', do you mean you want to close the new window?
Or do you want to open a new link in the original window?
If you just want to close the window, then you can use a javascript command such
as:  window.close()
However, if you want to open a link in the parent window, it is a bit more
tricky.
I wrote a quick test to see if it would work...Here is the code I used:

The parent page:


  
 

 
 test setting window.opener URL
  


the child page (testOpenerUpdate.html):


  

function setOpenerUrl(newUrl)
{
  window.opener.document.location.replace(newUrl);
  window.close();
}

  
  

   http://www.lycos.com')" value="send parent window to
lycos">

  


It appears that when submitting a form to a target '_blank', that the new window
is not actually a child of the current window.  Therefore, you cannot refer back
to it.  However, if you use a javascript, open() call, then you do create an
actual child.

I know that this is not a complete solution for you, but hopefully it is a step
in the right direction??

Pete

Linnea Ahlbeck wrote:

> Hi Pete!!
>
> This works, I didn´t know that I could use the target attribute in the
>  tag! Thanks! Do you also know how to specify the "old window" as
> target from the second window , I would like to return to the first window
> when the actions here are done?
>
> /Linnéa
>
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 14, 2001 7:33 PM
> Subject: Re: struts-config.xml - How do I open a "success" path as a new
> window???
>
> On Thu, 14 Jun 2001, Peter Alfors wrote:
>
> >
> > What happens when you execute this?
> >
> >  > target="_blank">
> >
> > I would think that this should do what you want??
> >
>
> You can also use the "target" attribute on an  or 
> tag:
>
>   
> target="_blank">
>   
> 
>   
>
> One advantage to this is that URL rewriting is automatically applied to
> maintain session state even if you're not using cookies.
>
> > Pete
> >
>
> Craig
>
> >
> > >  -Original Message-
> > >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> > >  Sent: Wednesday, June 13, 2001 1:52 AM
> > >  To: [EMAIL PROTECTED]
> > >  Subject: struts-config.xml - How do I open a "success" path
> > >  as a new window???
> > >
> > >  Hi!!
> > >
> > >  I want to my path
> > >
> > >  
> > >
> > >  to open the jsp-page as a new window/page ( like the html
> > >  tag
> > >
> > >  http://./";
> > >  target="_blank"> )
> > >
> > >  Any ideas how to do this with struts???
> > >
> > >  Thanks / Linnéa
> > >
> > >
> > >
> >




Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-15 Thread Linnea Ahlbeck

Hi Pete!!

This works, I didn´t know that I could use the target attribute in the
 tag! Thanks! Do you also know how to specify the "old window" as
target from the second window , I would like to return to the first window
when the actions here are done?

/Linnéa

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 7:33 PM
Subject: Re: struts-config.xml - How do I open a "success" path as a new
window???




On Thu, 14 Jun 2001, Peter Alfors wrote:

>
> What happens when you execute this?
>
>  target="_blank">
>
> I would think that this should do what you want??
>

You can also use the "target" attribute on an  or 
tag:

  

  

  

One advantage to this is that URL rewriting is automatically applied to
maintain session state even if you're not using cookies.

> Pete
>

Craig


>
> >  -Original Message-
> >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >      Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
>






RE: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread Abraham Kang

Thanks Pete,
Abraham

> -Original Message-
> From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 14, 2001 6:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: struts-config.xml - How do I open a "success" path as a new
> window???
>
>
> Your javascript code looks correct.  :)
>
> However, if at all possible, I would avoid using javascript.  Basically,
> because the user may have javascript turned off in their browser.
>
> Pete
>
> Abraham Kang wrote:
>
> > Hi Linnea,  I think it would be easier to use > href="javascript:window.open('yourAction.do','windowName',
> > 'status=no')">Your action will return mapping.findForward("success")
> > to load the popup windows contents.Pete,  my javascript is rusty so if
> > you see any errors please correct.--Abraham
> >
> >  -Original Message-
> >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >  Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
>




Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Peter Alfors wrote:

> 
> What happens when you execute this?
> 
>  target="_blank">
> 
> I would think that this should do what you want??
> 

You can also use the "target" attribute on an  or 
tag:

  

  

  

One advantage to this is that URL rewriting is automatically applied to
maintain session state even if you're not using cookies.

> Pete
> 

Craig


> 
> >  -Original Message-
> >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >  Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
> 




Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread dhay



You could use javascript to set the target in the form tag to _blank if you want
it in a new window.  As Pete said, however, the drawback is that they may have
Javascript turned off.

Dave





"Linnea Ahlbeck" <[EMAIL PROTECTED]> on 06/14/2001
10:30:04 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: struts-config.xml - How do I open a "success" path as a new
  window???






Hi Abraham and Pete!

Thanks for your help! The problem is  - I don´t use a link directly from my
jsp page to reach this new window. I have two submit buttons on my jsp-page,
Save and Insert Address . The form:action on the jsp-page is:



in Struts-Config.xml this action looks like this:

   
  
  
  
  
   

If i click on the submit button InsertAddress, saveComposeAction is the
first action. From the action class I check if Insert Address was the button
the user clicked on, if this is the case I return success2 and the path is:

path="/viewInsertAddress.do?action=Insert"/>

The action in struts_config.xml looks like this:


   
  
  
   

>From this class I return success and the path is :

path="/InsertAddress.jsp"/>

As it is now InsertAddress.jsp is onpened in the same window as the first
jsp-page but a want a new window!! Where do I enter this information and
how??
Any suggestions???

Thank you in advance!

/lLinnéa



- Original Message -
From: "Peter Alfors" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 3:57 PM
Subject: Re: struts-config.xml - How do I open a "success" path as a new
window???


> Your javascript code looks correct.  :)
>
> However, if at all possible, I would avoid using javascript.  Basically,
> because the user may have javascript turned off in their browser.
>
> Pete
>
> Abraham Kang wrote:
>
> > Hi Linnea,  I think it would be easier to use > href="javascript:window.open('yourAction.do','windowName',
> > 'status=no')">Your action will return mapping.findForward("success")
> > to load the popup windows contents.Pete,  my javascript is rusty so if
> > you see any errors please correct.--Abraham
> >
> >      -----Original Message-
> >      From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >  Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
>








Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread Linnea Ahlbeck

Hi Abraham and Pete!

Thanks for your help! The problem is  - I don´t use a link directly from my
jsp page to reach this new window. I have two submit buttons on my jsp-page,
Save and Insert Address . The form:action on the jsp-page is:



in Struts-Config.xml this action looks like this:

   
  
  
  
  
   

If i click on the submit button InsertAddress, saveComposeAction is the
first action. From the action class I check if Insert Address was the button
the user clicked on, if this is the case I return success2 and the path is:

path="/viewInsertAddress.do?action=Insert"/>

The action in struts_config.xml looks like this:


   
  
  
   

>From this class I return success and the path is :

path="/InsertAddress.jsp"/>

As it is now InsertAddress.jsp is onpened in the same window as the first
jsp-page but a want a new window!! Where do I enter this information and
how??
Any suggestions???

Thank you in advance!

/lLinnéa



- Original Message -
From: "Peter Alfors" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 3:57 PM
Subject: Re: struts-config.xml - How do I open a "success" path as a new
window???


> Your javascript code looks correct.  :)
>
> However, if at all possible, I would avoid using javascript.  Basically,
> because the user may have javascript turned off in their browser.
>
> Pete
>
> Abraham Kang wrote:
>
> > Hi Linnea,  I think it would be easier to use > href="javascript:window.open('yourAction.do','windowName',
> > 'status=no')">Your action will return mapping.findForward("success")
> > to load the popup windows contents.Pete,  my javascript is rusty so if
> > you see any errors please correct.--Abraham
> >
> >  -Original Message-----
> >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >  Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
>




Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread Peter Alfors

Your javascript code looks correct.  :)

However, if at all possible, I would avoid using javascript.  Basically,
because the user may have javascript turned off in their browser.

Pete

Abraham Kang wrote:

> Hi Linnea,  I think it would be easier to use href="javascript:window.open('yourAction.do','windowName',
> 'status=no')">Your action will return mapping.findForward("success")
> to load the popup windows contents.Pete,  my javascript is rusty so if
> you see any errors please correct.--Abraham
>
>  -Original Message-
>  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
>  Sent: Wednesday, June 13, 2001 1:52 AM
>  To: [EMAIL PROTECTED]
>  Subject: struts-config.xml - How do I open a "success" path
>  as a new window???
>
>  Hi!!
>
>  I want to my path
>
>  
>
>  to open the jsp-page as a new window/page ( like the html
>  tag
>
>  http://./";
>  target="_blank"> )
>
>  Any ideas how to do this with struts???
>
>  Thanks / Linnéa
>
>
>


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread Peter Alfors


What happens when you execute this?



I would think that this should do what you want??

Pete


>  -Original Message-
>  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
>  Sent: Wednesday, June 13, 2001 1:52 AM
>  To: [EMAIL PROTECTED]
>  Subject: struts-config.xml - How do I open a "success" path
>  as a new window???
>
>  Hi!!
>
>  I want to my path
>
>  
>
>  to open the jsp-page as a new window/page ( like the html
>  tag
>
>  http://./";
>  target="_blank"> )
>
>  Any ideas how to do this with struts???
>
>  Thanks / Linnéa
>
>
>


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: struts-config.xml - How do I open a "success" path as a new window???

2001-06-13 Thread Abraham Kang



Hi 
Linnea,
 
  
I think it would be easier to use
 

 
Your 
action will return mapping.findForward("success") to load the popup windows 
contents.
 
Pete,  my javascript is rusty so if you see any errors please 
correct.
 
--Abraham

  -Original Message-From: Linnea Ahlbeck 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 2001 
  1:52 AMTo: [EMAIL PROTECTED]Subject: 
  struts-config.xml - How do I open a "success" path as a new 
  window???
  
  Hi!!
  I want to my path
      path="/InsertAddress.jsp"/>
  to open the jsp-page as a new window/page ( like the html tag 
  target="_blank"> )
  Any ideas how to do this with struts???
  Thanks / Linnéa
   


struts-config.xml - How do I open a "success" path as a new window???

2001-06-13 Thread Linnea Ahlbeck




Hi!!
I want to my path
    path="/InsertAddress.jsp"/>
to open the jsp-page as a new window/page ( like the html tag 
target="_blank"> )
Any ideas how to do this with struts???
Thanks / Linnéa