Doing a bit of poking around, i found this bug:
dev.rubyonrails.org/ticket/7989,
which has been fixed. I assume this will be released in the next
version. testing with this fix fixes my problem.
Gareth
On Jun 20, 11:27 am, Gareth
<gare...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi
>
> I''m replacing an input element with another input element, e.g:
>
> <input id="testing" name="testing"
value="This is a test" />
> <button onclick="Replace(); return
false;">test</button>
> <script type="text/javascript">
> function Replace()
> {
>
Element.replace(''testing'', ''<input
id="testing" name="testing"
> value="This is a test replaced" />'');
> }
> </script>
>
> It works fine in IE and Safari. In firefox, everytime you click the
> button you get a blank input to the left of the replaced one. I
> selected all and viewed selection source. html was (of just the input
> part)
>
> <input><input id="testing" name="testing"
value="This is a test
> replaced">
>
> Anyone got any ideas? is this my code, or a bug in prototype?
>
> Thanks
>
> Gareth
--~--~---------~--~----~------------~-------~--~----~
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
groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---