Q:

Struts Javascript AJAX onsuccess page update 

I have a problem with updating an HTML site after an AJAX request success.
In my project I'm using old Struts 1 framework with a coolmenus JS component that produces a menu. After a form submit the server returns a block of JS code within <script> tags (among HTML) and these create a menu on page load each time. Now recently I had to implement a solution that is doing an AJAX request for updating my model on server side.
Everything to that point is OK, the model is being updated but the problem starts on swapping received html (using prototypejs):
$$('html')[0].innerHTML = t.responseText;

or
$$('html')[0].innerHTML.update(t.responseText);

It breaks my menu creation(there is no menu after update). I tried to get all 'script' tags from the body and invoke them from evalScripts() function, but it doesn't work at all. I mean the scripts are invoked but it doesn't create the menu.
Any ideas?

A:

I was trying to update the whole page, but I didn't have to. I ended up with extraction of the 'content' part of the page without touching the menu.

