The forum operates in read-only mode. Please head to StackOverflow for support.
<a href="" onclick="setText()">change text</a>
<a href="" onclick="setText();return false;">change text</a>
Re: setData not working - reloads page
causes that the browser
1. invokes setText function
2. follows the link with href="" (just as it was <a href="">change text</a>)
We don't want the second step to be taken, so we need to stop processing before the link is followed.
This can be achieved by
Re: setData not working - reloads page