//提示信息 感应鼠标移动事件 自动显示url页面内容
tooltip=function(id,url,width,height){
if(width == undefined) width = 550;
if(height == undefined) height =400;
TooltipManager.addAjax(id, {url: url, options: {method: 'get'}}, {width: width, height: height, showEffect: Element.show, hideEffect: Element.hide});
}
//页面调用
page.rhtml
<span id="tooltip_<%= baemployee.id %>">
<a href="#"><%= baemployee.name %></a>
</span>
<script type="text/javascript"> //tooltip_<%= baemployee.id %>在哪个上调用 page时action id时需要的参数
tooltip("tooltip_<%= baemployee.id %>","page?id=<%= baemployee.id%>",500,350);
</script>
//action
def page
@baemployee = Baemployee.find(params[:id])
render :action => "page"
end