|
Only in IE, prototype's Element.update() doesn't work multiple times
The following code works find in firefox and chrome. In IE, it only works the first time I click on a link. Any ideas?
Thanks in advance,
// I have some div's where help is, which I make non-viewable
<div id='help_guides'>
<div id='issue1'>Help with issue 1</div>
<div id='issue2'>Help with issue 2</div>
</div>
<a href="#" id="issue_1_link">Help with issue #1</a>
<a href="#" id="issue_2_link">Help with issue #2</a>
<div id='help'></div>
// I grab the help guide div into a variable
var issue_1_help = $('issue_1').remove();
var issue_2_help = $('issue_2').remove();
// When the help link is clicked, the help DIV displays the help guide
Event.observe( $('issue_1_link'), 'click', function() {
$('help').update( issue_1_help );
});
Event.observe( $('issue_2_link'), 'click', function() {
$('help').update( issue_2_help );
});
|