<div id = "container" >
<div id = "content" >Original Text</div>
</div>
<script type="text/javascript">
var newContent = "New Text";
$(''content'').update(newContent);
var someVar = $(''content'').innerHTML;
alert(someVar)
</script>
i get ''New Text'' in the alert in FF2
sorry
On 9/4/07, Pablo Impallari
<impallari-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Lets say i have some html like this:
>
> <div id = "container" >
> <div id = "content" >Original Text</div>
> </div>
>
> Then, the content is modified:
>
> var newContent = "New Text";
> $(''content'').update(newContent);
> $(''container'').innerHTML;
>
> Then if do:
> var someVar = $(''content'').innerHTML;
>
> In IE I get what is suposed to get --> NewText
> But in firefox I sitl get the un old version --> Original Text
>
> Any clue of what Im doing wrong?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---