On 11/7/05, Chad Armstrong <[EMAIL PROTECTED]> wrote:
> Hi all,
>   I'm pretty new to Struts (and using 1.0 at that, for business
> requirements). I've built a pretty simple application, retrieving
> records from a database, populating the Form object and using JSTL and
> struts tags to display the results. What I want to now do however, is
> provide a Print link that spawns a new window with a stripped down
> version of the content. It would be easy enough if the Print button
> just refreshed the page, I would just use a standard submit button and
> post back to the same page with a hidden form field flag set to not
> display the extraneous formatting. But I want to do this in a new
> window.
>
> I've tried the following:
>
> Using javascript to force a form submit in the onclick method of a
> text link, so I can do a target="_blank". That for some reason loses
> my hidden field value that I set in the onclick.
>
> Any ideas out there?

I am not sure that browser can automatically move all or some form
elements from one window to another (which may not be even a form).
Search this list, the similar question was asked about half a year
ago.

If you used clean (X)HTML with CSS and with a different stylesheet for
a printer, the things would be easier and cleaner, you would just
select Print Preview and see correctly formatted page.

Michael.

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

Reply via email to