JQuery XSLT Problem

Want to perform xslt as soon as the call is made and not at the end of

Page 1 of 1

0 Replies - 2588 Views - Last Post: 19 May 2009 - 10:40 AM

#1 gamodg   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 14-March 07

JQuery XSLT Problem

Posted 19 May 2009 - 10:40 AM

Hi

I am using jquery xslt plugin and the problem I am having is that when I perform xslt i.e

$('#outputDiv').xslt('PPPoE.xml','PPPoE.xsl'); 



the browser continues execution of the lines following this line(ie xslt line) and when the execution is finished it displays the xslt result.

I want that the xslt to be performed at the time of call and not at the last, since eqCol() method is called and it adjusts the height of #rightCol

making the output half visible. I can set the height of #outputDiv to some fixed value but I am trying to avoid hardcoded values.

if($(this).attr("href").indexOf("#")!=-1){
switch($(this).attr('title')){

	   case 'WAN' :	 $("#rightCol").empty();
		 $("#rightCol").append($wanTabs);//Append the tabs
		 tabEvents(this);//Assign click events to the tabs
		 try
		 {
		 $('#outputDiv').xslt('NM_Web_PPPoE.xml','NM_Web_PPPoE.xsl');// Perform XSLT and display in #outputDiv
		 // I want XSLT to be finished before it reaches 'break'. Have tried using timer but browser still displays
		 // the result at the end of execution.
		 }
		 catch (e)
		 {
		 alert(e);
		 }
		 break;
		 
   case 'OSPF':	$("#rightCol").empty().append($ospfTabs);
			   tabEvents(this);
			   break;   
}
function eqCol(){
				$("#leftCol").height("auto");
				$("#rightCol").height("auto");
				var lcol = $("#leftCol").height();
				var rcol = $("#rightCol").height();
				if(lcol>rcol){
								$("#rightCol").height(lcol+"px");
				}else{
								$("#leftCol").height(rcol+"px");
				}
}


Is This A Good Question/Topic? 0
  • +

Page 1 of 1