[Zope] javascript experts?

2010-05-22 Thread Garry Saddington
I am using some dynamic javascript to build form input controls and I 
have got everything working perfectly in all browsers except IE. The 
javascript uses square bracket notation to allow the 
phones.number:records to build multiple database input records for Zope.

if (eval(document.forms.playlist['phones.number:records'][ + idx + 
].value)  0)

However,IE interprets it as:
document.forms.playlist.phones.number:records
and of course therefore does not find the element referenced.
Can anyone suggest a workaround for IE in this respect.
Thanks
Garry
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] javascript experts?

2010-05-22 Thread Andrew Milton
+---[ Garry Saddington ]--
| I am using some dynamic javascript to build form input controls and I 
| have got everything working perfectly in all browsers except IE. The 
| javascript uses square bracket notation to allow the 
| phones.number:records to build multiple database input records for Zope.
| 
| if (eval(document.forms.playlist['phones.number:records'][ + idx + 
| ].value)  0)
| 
| However,IE interprets it as:
| document.forms.playlist.phones.number:records
| and of course therefore does not find the element referenced.
| Can anyone suggest a workaround for IE in this respect.

Use ids as well as names and grab the items out of the DOM.

-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )