Jump to content

How to access elements in AjaxAnywhere zones with DOM?


Lepper

Recommended Posts

How to access elements in AjaxAnywhere zones with DOM?Hello! I have a problem accesing the elements that is inside an AA (ajaxAnywhere) zone in my JSPs with the DOM thing. Also, the data that is contained in that elements it is not submited to the action, so... I had to make some big javascripts to send that data (slected item from a select box, words writen in a text box, etc) to the action making some "not sense" to use ajaxAnywhere. In example, if I want to access some property for a select box in the form of my JSP I use the following code: document.forms[0].selectBoxName.options[index].value but if that select box is inside an <aa:zone name="aaZoneName"> the previous code send me a javascript error saying me that "document.forms[0].selectBoxName" has no properties (doesn't exist). So... how can I access this element with DOM?? I have tried with "document.forms[0].aaZoneName.selectBoxName etc..." but the same error appears. And the other big problem is that the form beans inside aa:zone doesn't comunicate with the action (notice that I have defined a form properly with the same names etc... etc...) so I have to send all the information that I need in the action via URL... Am I doing something wrong? Am I a blasfemous being?I don't know in what DOM level the ajax zones lays... Thank you a lot for your help! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...