Set and get cookie with Javascript
Javascript function to set cookie: function setCookie(c_name, value, exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? “” : “; expires=”…
Javascript function to set cookie: function setCookie(c_name, value, exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? “” : “; expires=”…
The following is a list of Hypertext Transfer Protocol (HTTP) response status codes. 1xx Informational Request received, continuing process.[2] This class of status code indicates…
Initializing a Repository in an Existing Directory: $ git init Use git add commands that specify the files you want to track, followed by a…
Use this commands to force an overwrite of files on a git pull: git fetch –all git reset –hard origin/master
Standard ASCII set, HTML Entity names, ISO 10646, ISO 8879, ISO 8859-1 Latin alphabet No. 1 Browser support: All browsers ASCII HTML HTML Dec Hex…
Here is a bookmark script using jQuery: <script language=”javascript” type=”text/javascript”> $(document).ready(function(){ $(“a.jQueryBookmark”).click(function(e){ e.preventDefault(); // this will prevent the anchor tag from going the user off…
Get Url or Url parts using Javascript: window.location.href – get entire url window.location.protocol – get protocol: “http” / “https” window.location.host – get hostname, e.g: “www.g31zone.com”…
Get category image: <?php $_category = $this->getCurrentCategory(); $_imageUrl = $this->getImageUrl(); ?> Get category thumbnail: <?php $_category = $this->getCurrentCategory(); $_imageUrl = $this->getThumbnail(); ?>
Sample of loading javascript asyncronously: <script id=”myscript” type=”text/javascript”> (function() { var myscript = document.createElement(‘script’); myscript.type = ‘text/javascript’; myscript.src = (‘http://example.org/myscript.js’); var s = document.getElementById(‘myscript’); s.parentNode.insertBefore(myscript,…
jQuery – preview button in new tab(window), target blank <!– DOCTYPE –> <html> <head> <title>jQuery – preview button in new tab(window), target blank</title> <script src=”http://code.jquery.com/jquery-latest.js”></script>…