You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Katharina Weimer <ka...@gmx.de> on 2003/12/04 13:55:23 UTC
Woody - open new window on form submit
Hi,
does anyone have an idea how to open a new window on a form submit in woody
?
I have the following template:
<wt:form-template action="formselector" method="POST">
<wt:continuation-id/>
<table border="0">
.
.
.
.
<tr>
<td valign="top">
<wt:widget-label id="typ"/>
</td>
<td valign="top">
<wt:widget id="typ">
<wi:styling submit-on-change="true"/>
</wt:widget>
</td>
</tr>
</table>
<br/>
<wt:widget id="message"/>
<br/>
<br/>
<input type="submit" value="Go!"/>
</wt:form-template>
My javascript function looks like this:
function selectForm() {
var form = new Form("forms/formselector_form.xml");
form.showForm("formselector-view");
var project_no = form.getWidget("projekt");
cocoon.request.setAttribute("formselectorform", form.getWidget());
cocoon.sendPage(Project_no.getValue());
}
On submitting the above form Woody selects a pipline and generates a svg
graphic.
I'd like to have this svg on a new window, but I have no clue how to do
this, since putting an onclick="..." into the <input>Tag in the template does not
work as WoodytemplateTransformer does not support this.
Is there anybody out there who can help me out ?
Greetz,
Katharina
p.s: maybe there's a possibility for opening a new window with
cocoon.sendPage(), but I was looking at the docs and couldn't find anything...
--
HAKUNA MATATA !!!
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody - open new window on form submit
Posted by Jan Hoskens <jh...@schaubroeck.be>.
Hi again,
If you don't know the name of your new window until the button is clicked, I
think you have two options:
1) try to extract the name from your form with a javascript in your html
page (just an idea, don't know how:-)
and using a javascript function call in your
onclick='see_what_was_clicked'
2) Open a new window with a default name and try to set the windowname
afterwards (if that's possible somehow, don't know, never done it, maybe
redirecting the default-page to the correct one?)
Sorry can't help you any further, never had to do something alike!
Greetz,
Jan
-----Oorspronkelijk bericht-----
Van: Katharina Weimer [mailto:katharina_Weimer@gmx.de]
Verzonden: donderdag 4 december 2003 14:36
Aan: users@cocoon.apache.org
Onderwerp: RE: Woody - open new window on form submit
Thanks so far, Jan !
Yes you're right - it's possible opening a new window with
<input type="submit" onclick="window.open('mynewwindow')"/>.
But unfortunately in my case I just know the name under which the window
should be opened when the form is submitted. The Javascript below selects
the selected value from a selection list (in this case "projekt") and sends
a request to the sitemap which looks for the adequate pipeline.
So what I need is to tell this input button to open the generated svg in a
new window...
function selectForm() {
var form = new Form("forms/formselector_form.xml");
form.showForm("formselector-view");
var project_no = form.getWidget("projekt");
cocoon.request.setAttribute("formselectorform", form.getWidget());
cocoon.sendPage(Project_no.getValue());
}
Any ideas ?
Katharina
> Hello,
>
> As far as I know, everything that has the namespace wt will be handled
> by
> the woodyTemplateTransformer, if you use <input type="submit"
> onclick="window.open('mynewwindow')"/> this tag(or any other tag
> without
> namespace wt:) will just be copied by the transformer. So this code
> should
> work fine to open a new window.
>
> Bye,
>
> Jan
>
> -----Oorspronkelijk bericht-----
> Van: Katharina Weimer [mailto:katharina_Weimer@gmx.de]
> Verzonden: donderdag 4 december 2003 13:55
> Aan: users@cocoon.apache.org
> Onderwerp: Woody - open new window on form submit
>
>
> Hi,
>
> does anyone have an idea how to open a new window on a form submit in
> woody
> ?
>
> I have the following template:
>
> <wt:form-template action="formselector" method="POST">
> <wt:continuation-id/>
> <table border="0">
> .
> .
> .
> .
> <tr>
> <td valign="top">
> <wt:widget-label id="typ"/>
> </td>
> <td valign="top">
> <wt:widget id="typ">
> <wi:styling submit-on-change="true"/>
> </wt:widget>
> </td>
> </tr>
> </table>
> <br/>
> <wt:widget id="message"/>
> <br/>
> <br/>
> <input type="submit" value="Go!"/>
> </wt:form-template>
>
>
> My javascript function looks like this:
>
> function selectForm() {
> var form = new Form("forms/formselector_form.xml");
> form.showForm("formselector-view");
> var project_no = form.getWidget("projekt");
> cocoon.request.setAttribute("formselectorform", form.getWidget());
> cocoon.sendPage(Project_no.getValue());
> }
>
>
> On submitting the above form Woody selects a pipline and generates a
> svg graphic. I'd like to have this svg on a new window, but I have no
> clue how to do this, since putting an onclick="..." into the
> <input>Tag in the template does not work as WoodytemplateTransformer
> does not support this.
>
> Is there anybody out there who can help me out ?
> Greetz,
> Katharina
>
> p.s: maybe there's a possibility for opening a new window with
> cocoon.sendPage(), but I was looking at the docs and couldn't find
> anything...
>
> --
> HAKUNA MATATA !!!
>
> +++ GMX - die erste Adresse für Mail, Message, More +++
> Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
HAKUNA MATATA !!!
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody - open new window on form submit
Posted by Katharina Weimer <ka...@gmx.de>.
Thanks so far, Jan !
Yes you're right - it's possible opening a new window with
<input type="submit" onclick="window.open('mynewwindow')"/>.
But unfortunately in my case I just know the name under which the window
should be opened when the form is submitted.
The Javascript below selects the selected value from a selection list (in
this case "projekt") and sends a request to the sitemap which looks for the
adequate pipeline.
So what I need is to tell this input button to open the generated svg in a
new window...
function selectForm() {
var form = new Form("forms/formselector_form.xml");
form.showForm("formselector-view");
var project_no = form.getWidget("projekt");
cocoon.request.setAttribute("formselectorform", form.getWidget());
cocoon.sendPage(Project_no.getValue());
}
Any ideas ?
Katharina
> Hello,
>
> As far as I know, everything that has the namespace wt will be handled
> by
> the woodyTemplateTransformer, if you use <input type="submit"
> onclick="window.open('mynewwindow')"/> this tag(or any other tag
> without
> namespace wt:) will just be copied by the transformer. So this code
> should
> work fine to open a new window.
>
> Bye,
>
> Jan
>
> -----Oorspronkelijk bericht-----
> Van: Katharina Weimer [mailto:katharina_Weimer@gmx.de]
> Verzonden: donderdag 4 december 2003 13:55
> Aan: users@cocoon.apache.org
> Onderwerp: Woody - open new window on form submit
>
>
> Hi,
>
> does anyone have an idea how to open a new window on a form submit in
> woody
> ?
>
> I have the following template:
>
> <wt:form-template action="formselector" method="POST">
> <wt:continuation-id/>
> <table border="0">
> .
> .
> .
> .
> <tr>
> <td valign="top">
> <wt:widget-label id="typ"/>
> </td>
> <td valign="top">
> <wt:widget id="typ">
> <wi:styling submit-on-change="true"/>
> </wt:widget>
> </td>
> </tr>
> </table>
> <br/>
> <wt:widget id="message"/>
> <br/>
> <br/>
> <input type="submit" value="Go!"/>
> </wt:form-template>
>
>
> My javascript function looks like this:
>
> function selectForm() {
> var form = new Form("forms/formselector_form.xml");
> form.showForm("formselector-view");
> var project_no = form.getWidget("projekt");
> cocoon.request.setAttribute("formselectorform", form.getWidget());
> cocoon.sendPage(Project_no.getValue());
> }
>
>
> On submitting the above form Woody selects a pipline and generates a svg
> graphic. I'd like to have this svg on a new window, but I have no clue
> how
> to do this, since putting an onclick="..." into the <input>Tag in the
> template does not work as WoodytemplateTransformer does not support
> this.
>
> Is there anybody out there who can help me out ?
> Greetz,
> Katharina
>
> p.s: maybe there's a possibility for opening a new window with
> cocoon.sendPage(), but I was looking at the docs and couldn't find
> anything...
>
> --
> HAKUNA MATATA !!!
>
> +++ GMX - die erste Adresse für Mail, Message, More +++
> Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
HAKUNA MATATA !!!
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody - open new window on form submit
Posted by Jan Hoskens <jh...@schaubroeck.be>.
Hello,
As far as I know, everything that has the namespace wt will be handled by
the woodyTemplateTransformer, if you use <input type="submit"
onclick="window.open('mynewwindow')"/> this tag(or any other tag without
namespace wt:) will just be copied by the transformer. So this code should
work fine to open a new window.
Bye,
Jan
-----Oorspronkelijk bericht-----
Van: Katharina Weimer [mailto:katharina_Weimer@gmx.de]
Verzonden: donderdag 4 december 2003 13:55
Aan: users@cocoon.apache.org
Onderwerp: Woody - open new window on form submit
Hi,
does anyone have an idea how to open a new window on a form submit in woody
?
I have the following template:
<wt:form-template action="formselector" method="POST">
<wt:continuation-id/>
<table border="0">
.
.
.
.
<tr>
<td valign="top">
<wt:widget-label id="typ"/>
</td>
<td valign="top">
<wt:widget id="typ">
<wi:styling submit-on-change="true"/>
</wt:widget>
</td>
</tr>
</table>
<br/>
<wt:widget id="message"/>
<br/>
<br/>
<input type="submit" value="Go!"/>
</wt:form-template>
My javascript function looks like this:
function selectForm() {
var form = new Form("forms/formselector_form.xml");
form.showForm("formselector-view");
var project_no = form.getWidget("projekt");
cocoon.request.setAttribute("formselectorform", form.getWidget());
cocoon.sendPage(Project_no.getValue());
}
On submitting the above form Woody selects a pipline and generates a svg
graphic. I'd like to have this svg on a new window, but I have no clue how
to do this, since putting an onclick="..." into the <input>Tag in the
template does not work as WoodytemplateTransformer does not support this.
Is there anybody out there who can help me out ?
Greetz,
Katharina
p.s: maybe there's a possibility for opening a new window with
cocoon.sendPage(), but I was looking at the docs and couldn't find
anything...
--
HAKUNA MATATA !!!
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org