I have this code:
        new Ajax.Request(url,
                {
                        method: 'get',
                        onSuccess: function(transport)
                        {
                                var element = document.createElement("div");
                                Element.extend(element);
                                element.innerHTML = transport.responseText;
                                
$('content-title').update(element.getElementsBySelector('#title')
[0].innerHTML);
                                
$('content-text').update(element.getElementsBySelector('#content')
[0].innerHTML);
                        }
                }
        );

The file I'm loading looks like:
<div id="title">...</div>
<div id="content">...</div>
and I want to set the content of "title" to div element "content-
title" and content of "content" to "content-text". This code is
working fine in FF, Opera, etc. but in IE6 and IE7 it does nothing.
When I remove innerHTML and left only
element.getElementsBySelector('#*')[0] it inserts some empty object.

Can somebody help me how to solve this problem?
--~--~---------~--~----~------------~-------~--~----~
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