Javascript

From Sage CRM Knowledge Base
Revision as of 18:23, 7 November 2012 by Crmtogetherkb (talk | contribs)

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="";
 //top

res+="

";
  //content
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;

}