View Single Post
Old 09-17-2009, 06:44 PM   PM User | #1
becked
New to the CF scene

 
Join Date: Sep 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
becked is an unknown quantity at this point
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 );
});
becked is offline   Reply With Quote