|
Comments for: jon_campbell20070808
| Message # 1510885: |
|
Date: 01/08/09 11:19
By: Greg Burghardt Subject: RE: Limits in accessing form elements by name In reply to #3: "Also in some browsers there are limitations on the ability to access Form field elements by their Name attribute within AJAX dynamic content. You should always use the JavaScript element ID for Form elements within AJAX dynamic content." This is true only if the dynamic content was injected into the DOM using innerHTML. If you append new form fields to the DOM using standard methods, such as document.createElement and *.appendChild, then the FORM object model updates itself so you can use the form.elements.field_name syntax to gain access to a form field using JavaScript. To use the standard functions, however, you've got to work around an Internet Explorer bug as explained in one of my blog posts: "Cross-Browser JavaScript: Creating DOM Nodes That Set The name Property" http://fundamentaldisaster.blogspot.com/2008/10/cross-browser-javascript-creating-dom.html |
Previous Message | Next Message |
| Comments: | ||
| RE: Limits in accessing form elements by name | Greg Burghardt | 01/08/09 11:19 |
| AJAX to run a javascript from a form button | Tom Wilson | 07/02/08 11:24 |
| Sending a form using an AJAX library | Arnold Daniels | 08/11/07 12:16 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


