cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mratl...@collegenet.com
Subject Re: XMLForm having "-" like cocoon-action-next
Date Sun, 20 Oct 2002 03:27:17 GMT

sorry, that should be:
      documents.forms[0].elements['cocoon-xmlform-view'].value
also, if you need these to be variable names, use an associative array:
      var Vars=new Array()
      Vars['cocoon-xmlform-view']="some view"
      Vars['cocoon-action-prev']="some resource"
      Vars['cocoon-action-next']="some resource"
then
      foo="cocoon-xmlform-view'
      view=Vars[foo]
etc.

You guys are having way too much fun...




                                                                                         
           
                      apurva zaveri                                                      
           
                      <azaveri@yahoo.co        To:       cocoon-users@xml.apache.org, 
              
                      m>                        cocoon-dev@xml.apache.org             
              
                                               cc:                                       
           
                      10/19/02 08:00 PM        Subject:  XMLForm having "-" like cocoon-action-next
 
                      Please respond to                                                  
           
                      cocoon-dev                                                         
           
                                                                                         
           
                                                                                         
           




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







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


Mime
View raw message