On Mar 7, 5:53 am, "Booshan" <[EMAIL PROTECTED]> wrote:
> JS for replace and remove looks like this...
>
> $('d1').replace( "<div id='d1'>Some Data</div>");
>
> $('d1').remove();
You'll have to try harder:
<script type="text/javascript" src="prototype.js"></script>
<div id="d1">d1</div>
<div id="d2">d2</div>
<div id="d3">d3</div>
<div id="d4">d4</div>
<button onclick="
$('d1').replace( '<div id=d1>Some Data</div>');
$('d1').remove();
">Replace & remove d1</button>
Works fine in Prototype.js 1.5.
--
Rob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---