Javascript: Difference between revisions
From Sage CRM Knowledge Base
No edit summary |
No edit summary |
||
| Line 38: | Line 38: | ||
Ref: https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2013/12/31/sage-crm-7-2-adding-protection-to-your-code-in-script-libraries.aspx | Ref: https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2013/12/31/sage-crm-7-2-adding-protection-to-your-code-in-script-libraries.aspx | ||
http://devdocs.io/javascript/ | |||
---- | |||
Useful sites | |||
http://devdocs.io/javascript/ | |||
Revision as of 12:16, 9 March 2015
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));
}
For Request form
for(f = new Enumerator(Request.Form()); !f.atEnd(); f.moveNext())
{
var x = f.item();
Response.Write("
" + x + " = " + Request.Form(x));
}
Client side DOM - enumerate all checkboxes and set them as checked
var _cb=document.getElementsByTagName("input");
for(var i=0;i<_cb.length;i++)
{
var box=_cb[i];
if (box.type=="checkbox") box.checked=true;
}
Useful update from Jeff Richards regarding compressing javascript
http://javascriptcompressor.com/
Useful sites
http://devdocs.io/javascript/