Thanks a lot Fracture. Everything works perfectly :-) On Mar 27, 11:13 am, Fracture <[email protected]> wrote: > > Also, can I use 'getElementsByClassName' on a loaded DOM. > > Yes. For example: > > var html = '<span class="someClass">hi</span>'; > var temp = document.createElement("div"); > temp.innerHTML = html; > > var span = temp.getElementsByClassName("someClass")[0]; > > If an element with the class "someClass" does not exist in temp, span > will be undefined. Verify that you're inserting valid HTML and that > the element you're looking for actually exists. Try > alert(temp.innerHTML) after you insert the content.
-- You received this message because you are subscribed to the Google Groups "greasemonkey-users" 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/greasemonkey-users?hl=en.
