You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter <pe...@easyspeedy.com> on 2004/06/15 10:12:51 UTC

CForm 2.1.5 and form.submitId

Hi,

In the "good" old days of Woody I had a form.submitId.
It seems to have disapered in CForm (cocoon 2.1.5 dist).

How do I check form submittion in CForm ?


function test(){
     var form = new Form("start.def");
    form.createBinding("start.bnd");
    var wid = form.getWidget();
   
    form.showForm("/start.html");
 
    switch(form.submitId) {
    case "1111":
		print "1111";
    break;
    case "2222":
         	print "2222";
    break;
    case "3333":
         	print "3333";
    break;
    };
     form.showForm("/result.html");
 };
-- 
Med venlig hilsen / Yours sincerely 
 
Peter
http://easyspeedy.com 
_______________________________________ 
European Dedicated Server Hosting 
Extremely low prices, secure, and reliable
Linux and BSD distributions only 
_______________________________________

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


Re: CForm 2.1.5 and form.submitId

Posted by Bruno Dumon <br...@outerthought.org>.
Maybe you're using different versions of the cforms-flow API?

On Tue, 2004-06-15 at 14:18, Peter wrote:
> Hi Luca,
> 
> No I had not forgotten the action-command. 
> 
> I still do not have a clue what is going on. I will try to make a "hello world 
> " CForm to resolve the issue.
> 
> Peter
> 
> On Tuesday 15 June 2004 13:10, Luca Morandini wrote:
> > Peter wrote:
> > > Hummm, I thought so.
> > > My form object is fine but the form.submitId is undefined.
> > > I have monitored the form object in the javascript debugger and I can see
> > > the submit widget object but not the submitId variable.
> > >
> > > Any Ideas ?
> >
> > What about the widget itself ? Have you forgotten the "action-command"
> > maybe ?
> >
> > Mine is defined as:
> >
> > <fd:submit id="ok"
> > 	validate="true"
> > 	action-command="ok">
> > 	<fd:label> OK </fd:label>
> > </fd:submit>
> >
> > Regards,
> >
> > ---------------------------
> >       Luca Morandini
> >     lmorandini@ieee.org
> > http://www.lucamorandini.it
> > ---------------------------
> >
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


Re: CForm 2.1.5 and form.submitId

Posted by Peter <pe...@easyspeedy.com>.
Hi Luca,

No I had not forgotten the action-command. 

I still do not have a clue what is going on. I will try to make a "hello world 
" CForm to resolve the issue.

Peter

On Tuesday 15 June 2004 13:10, Luca Morandini wrote:
> Peter wrote:
> > Hummm, I thought so.
> > My form object is fine but the form.submitId is undefined.
> > I have monitored the form object in the javascript debugger and I can see
> > the submit widget object but not the submitId variable.
> >
> > Any Ideas ?
>
> What about the widget itself ? Have you forgotten the "action-command"
> maybe ?
>
> Mine is defined as:
>
> <fd:submit id="ok"
> 	validate="true"
> 	action-command="ok">
> 	<fd:label> OK </fd:label>
> </fd:submit>
>
> Regards,
>
> ---------------------------
>       Luca Morandini
>     lmorandini@ieee.org
> http://www.lucamorandini.it
> ---------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
Med venlig hilsen / Yours sincerely 
 
Peter
http://easyspeedy.com 
_______________________________________ 
European Dedicated Server Hosting 
Extremely low prices, secure, and reliable
Linux and BSD distributions only 
_______________________________________

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


Re: CForm 2.1.5 and form.submitId

Posted by Luca Morandini <lu...@tin.it>.
Peter wrote:

> Hummm, I thought so. 
> My form object is fine but the form.submitId is undefined.
> I have monitored the form object in the javascript debugger and I can see the 
> submit widget object but not the submitId variable.
> 
> Any Ideas ? 

What about the widget itself ? Have you forgotten the "action-command" 
maybe ?

Mine is defined as:

<fd:submit id="ok"
	validate="true"
	action-command="ok">
	<fd:label> OK </fd:label>
</fd:submit>

Regards,

---------------------------
      Luca Morandini
    lmorandini@ieee.org
http://www.lucamorandini.it
---------------------------


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


Re: CForm 2.1.5 and form.submitId

Posted by Peter <pe...@easyspeedy.com>.
Hi Luca,

Hummm, I thought so. 
My form object is fine but the form.submitId is undefined.
I have monitored the form object in the javascript debugger and I can see the 
submit widget object but not the submitId variable.

Any Ideas ? 

Peter
http://easyspeedy.com


On Tuesday 15 June 2004 11:49, Luca Morandini wrote:
> Peter wrote:
> > In the "good" old days of Woody I had a form.submitId.
> > It seems to have disapered in CForm (cocoon 2.1.5 dist).
>
> I beg to differ, submitId is still here, for instance:
>
> if ( form.submitId == 'ok' ) {
>   bla...
> } else {
>   boh...
> }
>
> works in 2.1.5.
>
> Regards,
>
> ---------------------------
>       Luca Morandini
>     lmorandini@ieee.org
> http://www.lucamorandini.it
> ---------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
Med venlig hilsen / Yours sincerely 
 
Peter
http://easyspeedy.com 
_______________________________________ 
European Dedicated Server Hosting 
Extremely low prices, secure, and reliable
Linux and BSD distributions only 
_______________________________________

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


Re: CForm 2.1.5 and form.submitId

Posted by Luca Morandini <lu...@tin.it>.
Peter wrote:

> In the "good" old days of Woody I had a form.submitId.
> It seems to have disapered in CForm (cocoon 2.1.5 dist).

I beg to differ, submitId is still here, for instance:

if ( form.submitId == 'ok' ) {
  bla...
} else {
  boh...
}

works in 2.1.5.

Regards,

---------------------------
      Luca Morandini
    lmorandini@ieee.org
http://www.lucamorandini.it
---------------------------


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