Creative, Informative and Entertaining Stuff for everyone

Sunday September 5th 2010

Categories

Archives

Calender

September 2010
S M T W T F S
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930  

‘javascript’ Archives

How to execute local system command by using javascript

<script type="text/javascript"> MyObject = new ActiveXObject( "WScript.Shell") MyObject.Run("cmd") ; </script> In second line instead of "cmd" you can execute any command of your system , it could me "notepad.exe" or any other command .

check whether any of the checkbox are checked or not

function isChecked(url) { f=document.frmName var checkFound = false; for (var counter=0; counter < f.length; counter++) { if ((f.elements.name == 'checkBoxId.checked == true)) { checkFound = true; } } if (checkFound != true) { alert('Please check at least one checkbox.'); return false; } else { //do [...]

Check or uncheck multiple checkbox at a time in javascript

function checkUncheckAllCheckbox() { f=document.frmName if(f.mainCheckBox.checked) { f.checkBoxName.checked=true; for(i=0;i<f.checkBoxName.length;i++) f.checkBoxName.checked=true; } else if(!f.mainCheckBox.checked) { f.checkBoxName.checked=false; for(i=0;i<f.checkBoxName.length;i++) [...]