$jds= '
hs.graphicsDir = "assets/plugins/directresize/libs/highslide/graphics/";
hs.outlineType = "rounded-white";
parent.window.addEvent("load", function() {
var element'.$from_id.' = $("container'.$from_id.'");
var mySlider'.$from_id.' = new Fx.Slide(element'.$from_id.', {duration: 900,transition: Fx.Transitions.circIn});
$("demoForm'.$from_id.'").addEvent("submit", function(e) {
$("load_status'.$from_id.'").style.display = "inline";
new Event(e).stop();
if ($("container'.$from_id.'").innerHTML == "") {
mySlider'.$from_id.'.hide();
new Ajax("[~127~]",{
postBody:$("demoForm'.$from_id.'").toQueryString(),
onComplete:showResponser,
update:element'.$from_id.'
}).request();} else {
new Ajax("[~127~]",{
postBody:$("demoForm'.$from_id.'").toQueryString(),
onComplete:showResponser,
update:element'.$from_id.'
});
mySlider'.$from_id.'.toggle();
$("load_status'.$from_id.'").style.display="none";
}
}
);
function showResponser(request){
$("load_status'.$from_id.'").style.display="none";
mySlider'.$from_id.'.hide();
mySlider'.$from_id.'.toggle();
trm = $("container'.$from_id.'").innerHTML;
}
})
';
этот код копируется на количество этих форм:
<form method="post" action="[~127~]" id="demoForm'.$from_id.'" style="margin: 0; padding:0; left:0;">
<input id="action" name="action" type="hidden" value="dittoAjax" />
<input id="num_page" name="num_page" type="hidden" value="'.$from_id.'"/>
<input id="template" name="template" type="hidden" value="'.$tpl.'"/>
<button type="submit" style="background: none; border: 0px;margin:0;padding:0;">'.$ptitle.'</button><img id="load_status'.$from_id.'" src="assets/plugins/directresize/libs/highslide/graphics/loader.white.gif" style="display: none;">
</form><div id="container'.$from_id.'" style="padding-bottom: 1px;"></div>';