Jiang, Jane (NIH/NCI) [C]
Mon, 05 May 2008 11:13:42 -0700
Thanks a lot for the suggestions. I ended up with an updated version of option 1. I played with options 1 and 2. Option 2 is very simple with http redirect. However, it leaves a blank window that I cannot close. For option 1, I cannot get window.location="mailto:..." to work. I had to use window.open("mailto:..."); So that leaves two blank windows. But I can close them with javascript. -----Original Message----- From: Jeromy Evans [EMAIL PROTECTED] Sent: Sunday, May 04, 2008 10:47 PM To: Struts Users Mailing List Subject: Re: S2 - email client as action result Jiang, Jane (NIH/NCI) [C] wrote: > I have a S2 action that looks up email address in the database. It > needs to open up an email client as the result with the address > populated (as if clicked on > [EMAIL PROTECTED]). > > What is the best way to set up the s2 result? > > Many thanks for your help, > > Jane > > > There's little you can do from within an action to request the client to launch a mail application. Here are some things to try, in order of likelihood of them working. 1. You could try return a page that contains javascript that attempts to open a mail program via the mailto: url. window.location="mailto:...". If you're along targeting IE you could use activex. 2. Perhaps you return a "redirect" result that redirects to "[EMAIL PROTECTED]". I doubt that all browsers would accept that. 3. Perhaps you could return an email content type (eg. a .eml file). I doubt that all browsers would accept that. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]