Skip to content

Instantly share code, notes, and snippets.

View longjasonm's full-sized avatar

Jason Long longjasonm

  • Raleigh, NC
View GitHub Profile
@longjasonm
longjasonm / gist:4711941
Created February 5, 2013 03:32
Make a Marketo iframe form "bust out" to the parent frame
$jQuery(document).ready(function(){
$jQ('.lpeRegForm').attr('target','_top');
});
@longjasonm
longjasonm / gist:4658095
Created January 28, 2013 19:01
Shortest way to print current year in Javascript; for use in web pages footers. Source: http://stackoverflow.com/questions/4562587/shortest-way-to-print-current-year-in-javascript
<script>document.write(new Date().getFullYear())</script>
<!-- Example Code -->
<span>&copy; 2000&ndash;<script>document.write(new Date().getFullYear())</script> Your Company Name</span>
@longjasonm
longjasonm / gist:4586504
Created January 21, 2013 14:36
Make Marketo iFrame form "bust out" to the Parent frame.
<script type="text/javascript" language="javascript">
//uses standard Marketo jQuery variable; if you have defined another variable, use it for "$jQ" instead.
$jQ(document).ready(function(){
$jQ('.lpeRegForm').attr('target','_top');
});
</script>
@longjasonm
longjasonm / gist:4516601
Last active December 11, 2015 00:28
A Force.com Validation Trigger to verify that all of the BANT fields are filled in before a lead can be saved as a TQL.
ISPICKVAL(Lead_Contact_Status__c, "TQL")
&&
OR (
ISPICKVAL( Budget__c,"" ),
ISPICKVAL( Need__c,"" ),
ISPICKVAL( Authority__c,"" ),
ISPICKVAL( Timing__c,"" )
)