switch (window.location.protocol) { case “http:”: include(‘http://www..js’); break; case “https:”: include(‘https://ssl..js’); break; default: include(‘http://www..js’); break; }
Monthly Archives: April 2010
How to redirect browser to https (ssl) in php
How to redirect the browser to https when site is using http protocal in PHP? First of all, you should know that SSL must be installed in the server. To redirect the browser to “https” , we must know that the site is using SSL or not at the moment. And for this, there is …
Continue reading “How to redirect browser to https (ssl) in php”
Mac screen capture
Here’s How: To capture the entire desktop, press Command-Shift-3. The screen shot will be automatically saved as a PNG file on your desktop. To copy the entire desktop, press Command-Control-Shift-3. The screen shot will be placed on your clipboard for you to paste into another program.
Tinymce on selected AREA
<script type=”text/javascript”> tinyMCE.init({ // General options mode : “exact”, theme : “advanced”, elements : “textareaID”, height: 500, …………………
Javascript Hiding Scrollbars
document.body.style.overflow=”hidden”; and document.body.style.overflow=”visible”;
display an object inf javascript
Here’s how to show the contents of a object in Javascript function concatObject(obj) { str=”; for(prop in obj) { str+=prop + ” value :”+ obj[prop]+”\n”; } return(str); }