I am using IE7 and Firefox. What I will describe below works
perfectly in Firefox: this description is limited to the problem in
IE7.
I have used cloneNode(true) to clone a textbox, then changed its id
attribute, and inserted it into the DOM with tbody.insertBefore. View
Generated Source in Firefox and the IE Developers Toolbar both show
that the generated source is perfect.
When I do the following in IE, widgetArray.size does not reflect the
dynamically added widget:
var widgetArray = $$("#" + empTableId + " tbody .period td div
input");
alert("widgetArray.size: " + widgetArray.size() );
//
returns 28
Specifically, there were 28 static html widgets satisfying this $$,
plus the dynamically added, 29th widget.
When I then loop with the following, the loop apparently attempts to
include the dynamically added widget. It successfully loops through
the 28 pre-existing static html, then basically crashes on the first
instruction inside the loop for the dynamically added 29th widget:
widgetArray.each(function(widget) {
alert("Beginning loop"); //crashes here
Any help would be very much appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---