You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Jue <te...@gmail.com> on 2007/08/28 20:55:26 UTC

T5 Conditional New Window on submit

Right now I have a form that opens a new window on submit, like this:

<form t:id="RunReportForm" target="_blank">
<t:errors />
<div align="center">
<input type="image" value="Submit" id="submit" name="Submit"
src="${runreportbtn}"/></div>
</form>

The error processing it does is all server side.  However, if there is an
error, it will open a new window and show the form's page, including the
errors.
At this point I have duplicate forms, and one shows the error.

I want to only open the next page in a new window "on Success"  Is this
possible?  Do I need to be using Javascript for this?

Thanks,
Daniel

Re: T5 Conditional New Window on submit

Posted by Josh Canfield <jo...@thedailytube.com>.
When you submit a form with target set to _blank the new window is
opened and the form is submitted there. The current page is not
refreshed. If you want to see the errors in the original window and
only open a new window you after the input is known to be good then
you have to post back to the same page and allow it to reload. If the
input is good then open the new window with the report.

I can't think of a way to do that without some javascript...

Josh


On 8/28/07, Daniel Jue <te...@gmail.com> wrote:
> Right now I have a form that opens a new window on submit, like this:
>
> <form t:id="RunReportForm" target="_blank">
> <t:errors />
> <div align="center">
> <input type="image" value="Submit" id="submit" name="Submit"
> src="${runreportbtn}"/></div>
> </form>
>
> The error processing it does is all server side.  However, if there is an
> error, it will open a new window and show the form's page, including the
> errors.
> At this point I have duplicate forms, and one shows the error.
>
> I want to only open the next page in a new window "on Success"  Is this
> possible?  Do I need to be using Javascript for this?
>
> Thanks,
> Daniel
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org