I am new to Prototype and was wondering how to simply "find" some text in a class/ID and "replace" this text.
My html is like this:
<div id="test">
<a href="/test">test</a>
<a href="/test2">test2</a>
<a href="/test3">test3</a>
<a href="/test4">test4</a>
</div>
And I am trying to replace the "test" in between the <a>
tags for the first <a>
with the word "success"
and the second <a>
with "success2"
. So it would look like
<div id="test">
<a href="/test">Login</a>
<a href="/test2">Register</a>
<a href="/test3">Bla</a>
<a href="/test4">Logout</a>
</div>
Any ideas how to do this ?