RE: Invoking Cocoon actions via JavaScript

2002-09-18 Thread Per Kreipke

> >Another thought:
> >
> >var action_xxx = eval("document.formName.cocoon-action-xxx");
> >
> 
> Won't something like 
> 
> document.formName['cocoon-action-xxx'] work? :-?

That's right. 

document.anycollectionname["objectname"] should work.

document.all, document.forms, 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Invoking Cocoon actions via JavaScript

2002-09-18 Thread Vadim Gritsenko

Robert Koberg wrote:

>Another thought:
>
>var action_xxx = eval("document.formName.cocoon-action-xxx");
>

Won't something like 

document.formName['cocoon-action-xxx'] work? :-?


IIRC, javascript had syntax like this...

Vadim


>-Rob
>
>  
>
>>-Original Message-
>>From: Robert Koberg [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, September 18, 2002 8:58 AM
>>To: [EMAIL PROTECTED]
>>Subject: RE: Invoking Cocoon actions via JavaScript
>>
>>
>>Hi,
>>
>>You could loop over the form's element array, use a switch statement
>>and use the
>>name string as a case match to set up your action input element objs in some
>>kind of body onload init function.
>>
>>var action_xxx;
>>var action_yyy;
>>var elems = frmObj.elements;
>>for (var i=0; i>switch (elems[i].name)
>>case "cocoon-action-xxx":
>>  action_xxx = elems[i];
>>case "cocoon-action-yyy":
>>  action_yyy = elems[i];
>>}
>>}
>>
>>best,
>>-Rob
>>
>>
>>
>>>-Original Message-
>>>From: Hunsberger, Peter [mailto:[EMAIL PROTECTED]]
>>>Sent: Wednesday, September 18, 2002 8:28 AM
>>>To: '[EMAIL PROTECTED]'
>>>Subject: Invoking Cocoon actions via JavaScript
>>>
>>>
>>>One of our developers has run into an issue that I can't see an easy
>>>solution to.  However, I also can't believe that no one else has run into
>>>the problem.
>>>
>>>We have a form where we are using IE 5.5 (and above) DHTML to enable drop
>>>and drag editing to reorder fields.  As the result of a drop, we determine
>>>some positional values, place these values into the form and then attempt to
>>>submit the form to the server where the values will be placed in a database.
>>>In order to submit the form, the JavaScript code has to invoke the proper
>>>HTML action for the form, which is named using the Cocoon standard
>>>"cocoon-action-" format.  Since JavaScript attempts to resolve the
>>>action name as an JavaScript object it eventually turns a string of this
>>>format into three object names separated by  two minus signs and
>>>subsequently blows up trying to subtract non-existent JavaScript objects
>>>from each other.
>>>
>>>One obvious fix would be to change Cocoon to not use "-" in the action
>>>names. Given that this would break just about every Cocoon implementation in
>>>the world I'm hoping that someone has run into this before and found a work
>>>around on the JavaScript side of the world?
>>>
>>>Peter Hunsberger
>>>
>>>Phone: 901-495-5252
>>>E-mail: [EMAIL PROTECTED]
>>>
>>>  
>>>




-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




RE: Invoking Cocoon actions via JavaScript

2002-09-18 Thread Matthew Hailstone

An interesting twist to utilizing javascript is a new product called
WebFace from Vultus. It is server independent, and uses XML, SOAP, and
javascript to present an incredible client interface. Cocoon actions and
xslt in the sitemap transforming logic to WebFace's xml structures could
be powerful. Downside is is does cost a little, but not bad compared to
other web IDE's. www.vultus.com

Matthew

> -Original Message-
> From: Robert Koberg [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 18, 2002 10:02 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Invoking Cocoon actions via JavaScript
> 
> 
> Another thought:
> 
> var action_xxx = eval("document.formName.cocoon-action-xxx");
> 
> -Rob
> 
> > -Original Message-
> > From: Robert Koberg [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 18, 2002 8:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Invoking Cocoon actions via JavaScript
> >
> >
> > Hi,
> >
> > You could loop over the form's element array, use a switch 
> statement 
> > and use the name string as a case match to set up your action input 
> > element objs in some kind of body onload init function.
> >
> > var action_xxx;
> > var action_yyy;
> > var elems = frmObj.elements;
> > for (var i=0; i > switch (elems[i].name)
> > case "cocoon-action-xxx":
> >   action_xxx = elems[i];
> > case "cocoon-action-yyy":
> >   action_yyy = elems[i];
> > }
> > }
> >
> > best,
> > -Rob
> >
> > > -Original Message-
> > > From: Hunsberger, Peter [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, September 18, 2002 8:28 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: Invoking Cocoon actions via JavaScript
> > >
> > >
> > > One of our developers has run into an issue that I can't 
> see an easy 
> > > solution to.  However, I also can't believe that no one 
> else has run 
> > > into the problem.
> > >
> > > We have a form where we are using IE 5.5 (and above) 
> DHTML to enable 
> > > drop and drag editing to reorder fields.  As the result 
> of a drop, 
> > > we determine some positional values, place these values into the 
> > > form and then attempt to submit the form to the server where the 
> > > values will be placed in a database. In order to submit the form, 
> > > the JavaScript code has to invoke the proper HTML action for the 
> > > form, which is named using the Cocoon standard 
> "cocoon-action-" 
> > > format.  Since JavaScript attempts to resolve the action 
> name as an 
> > > JavaScript object it eventually turns a string of this 
> format into 
> > > three object names separated by  two minus signs and subsequently 
> > > blows up trying to subtract non-existent JavaScript objects from 
> > > each other.
> > >
> > > One obvious fix would be to change Cocoon to not use "-" in the 
> > > action names. Given that this would break just about every Cocoon 
> > > implementation in the world I'm hoping that someone has run into 
> > > this before and found a work around on the JavaScript side of the 
> > > world?
> > >
> > > Peter Hunsberger
> > >
> > > Phone: 901-495-5252
> > > E-mail: [EMAIL PROTECTED]
> > >
> > >
> > > 
> 
> > > -
> > > Please check that your question  has not already been 
> answered in the
> > > FAQ before posting. 
> <http://xml.apache.org/cocoon/faq/index.html>
> > >
> > > To 
> unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> > >
> >
> >
> >
> > 
> -
> > Please check that your question  has not already been 
> answered in the
> > FAQ before posting. 
> <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To 
> unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> >
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




RE: Invoking Cocoon actions via JavaScript

2002-09-18 Thread Robert Koberg

Another thought:

var action_xxx = eval("document.formName.cocoon-action-xxx");

-Rob

> -Original Message-
> From: Robert Koberg [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 8:58 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Invoking Cocoon actions via JavaScript
>
>
> Hi,
>
> You could loop over the form's element array, use a switch statement
> and use the
> name string as a case match to set up your action input element objs in some
> kind of body onload init function.
>
> var action_xxx;
> var action_yyy;
> var elems = frmObj.elements;
> for (var i=0; i switch (elems[i].name)
> case "cocoon-action-xxx":
>   action_xxx = elems[i];
> case "cocoon-action-yyy":
>   action_yyy = elems[i];
> }
> }
>
> best,
> -Rob
>
> > -Original Message-
> > From: Hunsberger, Peter [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 18, 2002 8:28 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Invoking Cocoon actions via JavaScript
> >
> >
> > One of our developers has run into an issue that I can't see an easy
> > solution to.  However, I also can't believe that no one else has run into
> > the problem.
> >
> > We have a form where we are using IE 5.5 (and above) DHTML to enable drop
> > and drag editing to reorder fields.  As the result of a drop, we determine
> > some positional values, place these values into the form and then attempt to
> > submit the form to the server where the values will be placed in a database.
> > In order to submit the form, the JavaScript code has to invoke the proper
> > HTML action for the form, which is named using the Cocoon standard
> > "cocoon-action-" format.  Since JavaScript attempts to resolve the
> > action name as an JavaScript object it eventually turns a string of this
> > format into three object names separated by  two minus signs and
> > subsequently blows up trying to subtract non-existent JavaScript objects
> > from each other.
> >
> > One obvious fix would be to change Cocoon to not use "-" in the action
> > names. Given that this would break just about every Cocoon implementation in
> > the world I'm hoping that someone has run into this before and found a work
> > around on the JavaScript side of the world?
> >
> > Peter Hunsberger
> >
> > Phone: 901-495-5252
> > E-mail: [EMAIL PROTECTED]
> >
> >
> > -
> > Please check that your question  has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   <[EMAIL PROTECTED]>
> >
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




RE: Invoking Cocoon actions via JavaScript

2002-09-18 Thread Robert Koberg

Hi,

You could loop over the form's element array, use a switch statement and use the
name string as a case match to set up your action input element objs in some
kind of body onload init function.

var action_xxx;
var action_yyy;
var elems = frmObj.elements;
for (var i=0; i -Original Message-
> From: Hunsberger, Peter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 8:28 AM
> To: '[EMAIL PROTECTED]'
> Subject: Invoking Cocoon actions via JavaScript
>
>
> One of our developers has run into an issue that I can't see an easy
> solution to.  However, I also can't believe that no one else has run into
> the problem.
>
> We have a form where we are using IE 5.5 (and above) DHTML to enable drop
> and drag editing to reorder fields.  As the result of a drop, we determine
> some positional values, place these values into the form and then attempt to
> submit the form to the server where the values will be placed in a database.
> In order to submit the form, the JavaScript code has to invoke the proper
> HTML action for the form, which is named using the Cocoon standard
> "cocoon-action-" format.  Since JavaScript attempts to resolve the
> action name as an JavaScript object it eventually turns a string of this
> format into three object names separated by  two minus signs and
> subsequently blows up trying to subtract non-existent JavaScript objects
> from each other.
>
> One obvious fix would be to change Cocoon to not use "-" in the action
> names. Given that this would break just about every Cocoon implementation in
> the world I'm hoping that someone has run into this before and found a work
> around on the JavaScript side of the world?
>
> Peter Hunsberger
>
> Phone: 901-495-5252
> E-mail: [EMAIL PROTECTED]
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Invoking Cocoon actions via JavaScript

2002-09-18 Thread Hunsberger, Peter

One of our developers has run into an issue that I can't see an easy
solution to.  However, I also can't believe that no one else has run into
the problem.

We have a form where we are using IE 5.5 (and above) DHTML to enable drop
and drag editing to reorder fields.  As the result of a drop, we determine
some positional values, place these values into the form and then attempt to
submit the form to the server where the values will be placed in a database.
In order to submit the form, the JavaScript code has to invoke the proper
HTML action for the form, which is named using the Cocoon standard
"cocoon-action-" format.  Since JavaScript attempts to resolve the
action name as an JavaScript object it eventually turns a string of this
format into three object names separated by  two minus signs and
subsequently blows up trying to subtract non-existent JavaScript objects
from each other.

One obvious fix would be to change Cocoon to not use "-" in the action
names. Given that this would break just about every Cocoon implementation in
the world I'm hoping that someone has run into this before and found a work
around on the JavaScript side of the world?

Peter Hunsberger

Phone: 901-495-5252
E-mail: [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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