Hello together,

does anyone know why IE does not focus on elements that are pasted in
the DOM via Prototypes "Element.insert" or the JavaScript-Basic
"appendChild()"?

Following scenario:

-------------------------------------------

<div id="pasteMeHere">
        <span id="testFocus_1" tabindex="0" style="border:solid red">Focus me!
</span>
</div>

<script>
        var test = document.createElement("span");
                test.innerHTML = 'Focus me too!';
                test.style.border = 'solid green';
                test.setAttribute('id', "testFocus_2");
                test.setAttribute('tabindex', '0');

        // Choose one of the following:

        // 1. Prototype-Way: NOT WORKING!
       $("pasteMeHere").insert({ bottom: test });

        // 2. Basic JavaScript-Way: NOT WORKING!
        document.getElementById("pasteMeHere").appendChild(test

        // 3. Additional-Way: WORKING!
        document.write('<span id="testFocus_2" style="border: medium
solid green;" tabindex="0">Focus me too!</span>')
</script>

-------------------------------------------

If I include my new span-Tag with the first or second method it is not
possible to focus it via the tabulator.
Thanks for any hints ...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to