| -----Original Message-----
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, August 15, 2002 7:42 AM
| To: Struts Users Mailing List
| Subject: Opening another window in javascript
| 
| I am using Struts 1.1 and have an action that ultimately forwards to a
JSP
| page.  In this JSP page I would like to present the user with an image
| button that will pop open a particular URL in a separate window.
| 
| I have seen a few suggestions regarding this on the mailing list but
there
| are a few things that make this a bit tricky.  First issue is that the
| window needs to be a javascript window because I want to control the
size,
| I
| don't want to show a navigation bar, etc.  (So the suggestion I've
seen
| about posting to a target that doesn't exist won't work for me).

I do a lot of pop up windows in my application to handle file uploads,
etc.  What I've done is that my link or button that launches the window
is actually calling another javascript method.  Now, the that method
actually does the window.open() method, but all the variables of it,
size, position, url, etc are populated via <%= %>.  So the resulting
code thinks all those variables were hard coded in the first place.

Second
| issue is that I will have several of these pages and the URL will vary
for
| each (so I'd like to write the code once as an include and vary the
| message - perhaps using the ApplicationResources file).

No different than any other page.

| 
| The final issue is that the prefix for the URL will vary depending on
what
| environment its deployed in.  I currently have a scheme where I
configure
| a
| few container/application variables through $TOMCAT/conf/web.xml that
will
| give you the correct prefix.

Context relative location won't work?
| 
| Ex.
| 
| In development I would have urlPrefix = http://dev.techsupport.com/
| In integration I would have urlPrefix = http://int.techsupport.com/
| 
| So basically, I want to configure the specific pages outside the JSP
| (ideally in the resource properties file) and I need to do some
| preprocessing before plunking it into the javascript (basically
appending
| a
| urlPrefix variable that is available through the ServletContext).  I
have
| some ideas on how I could do this, but its not sitting well with me
(you
| know what I mean?).  Looking for something that is consistent with the
| struts MVC approach.
| 
| TIA,
| 
| - sean
| 
| 
| --
| To unsubscribe, e-mail:   <mailto:struts-user-
| [EMAIL PROTECTED]>
| For additional commands, e-mail: <mailto:struts-user-
| [EMAIL PROTECTED]>
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to