You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by apurva zaveri <az...@yahoo.com> on 2002/10/20 05:00:30 UTC

XMLForm having "-" like cocoon-action-next

XMLForm has form items named:

cocoon-action-prev
cocoon-action-next
cocoon-xmlform-view

all of them have "-" in it. Problem is javascript can
not access such form items. 
i.e. you can not do 

documents.form.cocoon-xmlform-view.value 
or something like that.

In HTML if you want to do this it will be an
javascript error. [Although you may not run in a
situation that demands to do that]

But in VXML where all field in form are actually
javascript variables you can not have a field/js-var
called "cocoon-action-next" as in javascript you can
not have a variable called "cocoon-action-next".

Accorgigly I suggest to change the nameing conventions
of

cocoon-action-prev
cocoon-action-next
cocoon-xmlform-view

Or am I missing something?

-Apurva


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

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


Re: XMLForm having "-" like cocoon-action-next

Posted by Ivelin Ivanov <iv...@apache.org>.
Did you try

document.forms["cocoon-xmlform-view"]

see:
http://www.devguru.com/Technologies/ecmascript/quickref/doc_forms.html




----- Original Message ----- 
From: "apurva zaveri" <az...@yahoo.com>
To: <co...@xml.apache.org>; <co...@xml.apache.org>
Sent: Saturday, October 19, 2002 10:00 PM
Subject: XMLForm having "-" like cocoon-action-next


> XMLForm has form items named:
> 
> cocoon-action-prev
> cocoon-action-next
> cocoon-xmlform-view
> 
> all of them have "-" in it. Problem is javascript can
> not access such form items. 
> i.e. you can not do 
> 
> documents.form.cocoon-xmlform-view.value 
> or something like that.
> 
> In HTML if you want to do this it will be an
> javascript error. [Although you may not run in a
> situation that demands to do that]
> 
> But in VXML where all field in form are actually
> javascript variables you can not have a field/js-var
> called "cocoon-action-next" as in javascript you can
> not have a variable called "cocoon-action-next".
> 
> Accorgigly I suggest to change the nameing conventions
> of
> 
> cocoon-action-prev
> cocoon-action-next
> cocoon-xmlform-view
> 
> Or am I missing something?
> 
> -Apurva
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Y! Web Hosting - Let the expert host your web site
> http://webhosting.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>