Javascript: Difference between revisions

From Sage CRM Knowledge Base
No edit summary
No edit summary
Line 17: Line 17:
     var themepath="/crm/Themes/img/color/backgrounds/";   
     var themepath="/crm/Themes/img/color/backgrounds/";   
     var res="";
     var res="";
     res+="<TABLE border=0 cellpadding=0 cellspacing=0 ><TR><TD colSpan=3><TABLE border=0 cellSpacing=0 cellPadding=0 width=\"100%\">"+
     res="<TABLE border=0 cellpadding=0 cellspacing=0 ><TR><TD colSpan=3><TABLE border=0 cellSpacing=0 cellPadding=0 width=\"100%\">"+
       "<TR>"+
       "<TR>"+
       "<TD vAlign=bottom><IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"paneleftcorner.jpg\"></TD>"+
       "<TD vAlign=bottom><IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"paneleftcorner.jpg\"></TD>"+

Revision as of 18:24, 7 November 2012

Useful ASP javascript code to see all "Request.ServerVariables"

Could also be used on "Request.Form" etc

   for(f = new Enumerator(Request.ServerVariables()); !f.atEnd(); f.moveNext()) 
   { 
       var x = f.item(); 
       Response.Write("" + x + " = " + Request.ServerVariables(x)); 
   }



Useful function to wrap any content in a nice block

 function wrapscreen(title, content)
 {
   var themepath="/crm/Themes/img/color/backgrounds/";  
   var res="";

res="

"; res+=""+ ""+ "
"+ ""+ ""+ ""+ ""+ ""+ "</TBODY>
<IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"paneleftcorner.jpg\">"+title+"<IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"panerightcorner.gif\">  
<IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"tabletopborder.gif\">"+content+ "<IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"tabletopborder.gif\">


";

   return res;
 }