I am using link_to_remote to update part of the page. The new content
that is going to replace the original one has javascript tabs. The
problem is the javascript tabs doesn't work in this situation. The tabs
works fine when I use link_to to navigate through pages. The javascript
validation in the new content is working. Where did it went wrong?
Someone please help.
I am using link_to_remote to update part of the page. The new content
that is going to replace the original one has javascript tabs. The
problem is the javascript tabs doesn't work in this situation. The tabs
works fine when I use link_to to navigate through pages. The javascript
validation in the new content is working. Where did it went wrong?
Someone please help.
Hi,
Sorry my mistake. This problem doesnt happen to my link_to_remote. The
above problem is happening to my javascript tree menu. When the link is
clicked, the tabs are not showing. Where did it went wrong? How can I
write a javascript that resembles link_to_remote? Please help
Thanks
..........tree menu.........
function ajax_init() {
var myajax = new Ajax.Request;
return myajax;
}
function drawTree ( tree_items ,div_id ) {
new tree (tree_items , TREE_TPL,
document.getElementById('profile_tree_panel') );
callbackfunction = get_detail;
}
function get_detail( args ) {
var target_url = args.split('_')[0];
target_url = target_url.replace(/-/g,"_");
unknown_url = target_url.split('*');
var myajax = ajax_init();
switch(unknown_url[1])
{
case "0":
new_url = unknown_url[0] + "?name=0"
break;
case undefined:
new_url = target_url
break;
case "Total":
new_url = unknown_url[0] + "?name=1"
break;
case "Site":
new_url = unknown_url[0] + "?name=2"
break;
default:
new_url = unknown_url[0] + "?name=3"
}