I am using the latest 1.5.1.1 stable prototype, and a click observer
added through $$('a.citation').invoke to all of the citations on this
page:
<http://oll.libertyfund.org/index.php?
option=com_staticxt&staticfile=advanced_search.php>
The page works perfectly in Safari 2 and Firefox 2, but stubbornly
navigates to the target of the link when clicked in Safari 1.3.9. I
added a return false to the end of my function just to see if that
might help, even though I know it's inside an anonymous function.
Does anyone have any bright ideas how I might fix this?
//sample link
<a href="http://oll.libertyfund.org/340/44332/604638" title="show
citation" class="citation" id="cit_604638"><img
src="static/citation.gif" width="80" height="14" alt="" /></a>
//script
<script type="text/javascript" charset="utf-8">
$$('a.citation').invoke('observe','click',function(evt){
me = Event.element(evt).parentNode;
uri = me.href.substr(27).split('/');
new Ajax.Updater(me.parentNode,
'http://oll.libertyfund.org/ajax_citation.php',{parameters: { id:
uri[0], chapter: uri[1], para: uri[2] }, insertion: Insertion.Bottom});
Event.stop(evt);
return false;
});
</script>
Thanks in advance,
Walter
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---