Javascript: Difference between revisions

From Sage CRM Knowledge Base
No edit summary
No edit summary
Line 13: Line 13:
Useful function to wrap any content in a nice block
Useful function to wrap any content in a nice block


function wrapscreen(title, content)
  function wrapscreen(title, content)
{
  {
  var themepath="/crm/Themes/img/color/backgrounds/";   
    var themepath="/crm/Themes/img/color/backgrounds/";   
  var res="";
    var res="";
  //top
    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>"+
Line 25: Line 24:
       "<TD class=TABLETOPBORDER>&nbsp;</TD>"+
       "<TD class=TABLETOPBORDER>&nbsp;</TD>"+
       "<TD class=TABLETOPBORDER vAlign=bottom width=\"90%\" align=right COPSPAN=\"30\">&nbsp;</TD></TR></TBODY></TABLE></TD></TR>";
       "<TD class=TABLETOPBORDER vAlign=bottom width=\"90%\" align=right COPSPAN=\"30\">&nbsp;</TD></TR></TBODY></TABLE></TD></TR>";
  //content
    res+="<TR class=CONTENT><TD  class=TABLEBORDERLEFT width=1><IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"tabletopborder.gif\"></TD>"+
  res+="<TR class=CONTENT><TD  class=TABLEBORDERLEFT width=1><IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"tabletopborder.gif\"></TD>"+
         "<TD class=VIEWBOXCAPTION height=\"100%\" width=\"100%\">"+content+
         "<TD class=VIEWBOXCAPTION height=\"100%\" width=\"100%\">"+content+
         "<TD class=TABLEBORDERRIGHT Rowspan=10 width=1><IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"tabletopborder.gif\"></TD></TR><TR>"+
         "<TD class=TABLEBORDERRIGHT Rowspan=10 width=1><IMG title=\"\" border=0 hspace=0 align=top src=\""+themepath+"tabletopborder.gif\"></TD></TR><TR>"+
         "<TD class=TABLEBORDERBOTTOM width=1 colSpan=30></TD></TR></TABLE><br />";
         "<TD class=TABLEBORDERBOTTOM width=1 colSpan=30></TD></TR></TABLE><br />";
  return res;
    return res;
}
  }

Revision as of 18:23, 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;
 }