Can someone give me an example of the "replace" feature because the
prototype documentation is hard to understand.

==my failiure i tried== (example taken from api)
<html>
<head>
  <script type="text/javascript" src="prototype.js"></script>

<script type="text/javascript" >
$('first').replace('<ul id="favorite"><li>kiwi</li><li>banana</
li><li>apple</li></ul>');
// -> HTMLElement (p#first)
$('fruits').innerHTML;
// -> '<ul id="favorite"><li>kiwi</li><li>banana</li><li>apple</li></
ul>'
</script>
</head>

<body>
<div id="food">
  <div id="fruits">
    <p id="first">Kiwi, banana <em>and</em> apple.</p>
  </div>
</div>
</body></html>
--~--~---------~--~----~------------~-------~--~----~
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