DEVGET.NET

Feeding Your Inner Developer

Month: July 2013

How to create a ‘select all’ checkbox in javascript

For HTML Code: <input type=”checkbox” onClick=”toggle(this)” /> <input type=’checkbox’ name=’ss’ value=’one’ /> <input type=’checkbox’ name=’ss’ value=’two’ /> <input type=’checkbox’ name=’ss’…

How to add hidden fields to form and submit with Javascript

In HTML Code: <form action=’myScript.php’ method=’get’ name=’myForm’> </form> Javascript code: var form = document.forms[‘myForm’]; // form.action = ‘put your url…

Boolean toggle in PHP

Instead of using: if($boolean === true){ $boolean = false; }else{ $boolean = true; } One can use $boolean = !$boolean;…

Linux how to ‘echo’ without a new line

Simply put: use printf printf “Hello World” Alternatively, if you insist on using echo echo -e “No New line…c” test…

How to get a previous date in bash (linux)

Simply put date -d ‘1 day ago’ +’%Y-%m-%d’ # For multiple days date -d ‘7 days ago’ +’%Y-%m-%d’ If you…

© 2020 DEVGET.NET. Theme by Anders Norén.