This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fakeClick(event, anchorObj) { | |
| if ((typeof(anchorObj)!="undefined") && (typeof(anchorObj.click)!="undefined")) { | |
| anchorObj.click() | |
| } | |
| else if(document.createEvent) { | |
| if(event.target !== anchorObj) { | |
| var evt = document.createEvent("MouseEvents"); | |
| evt.initMouseEvent("click", true, true, window, | |
| 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| var allowDefault = anchorObj.dispatchEvent(evt); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hasNum(val) { | |
| for (var i in val) { | |
| if (!isNaN(parseInt(val[parseInt(i)]))) return true; | |
| } | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hasAlpha(val,upper) { | |
| if (upper) { | |
| for (var i in val) { | |
| if ((val.charCodeAt(i)>=65) && (val.charCodeAt(i)<=90)) return true; | |
| } | |
| } | |
| else { | |
| for (var i in val) { | |
| if ((val.charCodeAt(i)>=97) && (val.charCodeAt(i)<=122)) return true; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getQueryVariable(variable,fromSrc) { | |
| fromSrc = fromSrc || false; | |
| if (fromSrc) { | |
| var myScript = document.currentScript; | |
| var query = myScript.src.replace(/^[^\?]+\??/,''); | |
| } | |
| else { | |
| var query = window.location.search.substring(1); | |
| } | |
| var vars = query.split('&'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Usage: | |
| initDialog("Add a Staff Member",true,updateContact); | |
| appendForm($( "#dialog-form" ),"addStaff","?module=staff&mode=add"); | |
| appendDetail($( "#addStaff_id" ),"First Name:","first_name",""); | |
| appendDetail($( "#addStaff_id" ),"Last Name:","last_name",""); | |
| openDialog(); | |
| initDialog: (form title str, destroyOnClose, submitCallback) | |
| appendForm: (id to append to - will make this deprecated, will always be this ojbect |
NewerOlder