1 0 Tag Archives: Javascript
post icon

How to remove “Clearbox is ready” popup messages that appear?

Clearbox is a lightbox script based on the jQuery framework. When user loads the page, it shows message “clearbox is ready”,

To disable it go to /clearbox/config/default/cb_config.js

The new code has to be this with “OFF” :
CB_OSD=’off’, // turns on OSD
CB_OSDShowReady=’off’, // when clearbox is loaded and ready, it shows an OSD message

Leave a Comment
post icon

Screen resolution using java script and using it in php

use this code to set screen resolution into a cookie

< script language=”javascript”>
<!–
writeCookie();
function writeCookie()
{
var today = new Date();
var the_date = new Date(“December 31, 2023”);
var the_cookie_date = the_date.toGMTString();

var the_cookie = “users_resolutionx=”+ screen.width ;
var the_cookie = the_cookie + “;expires=” + the_cookie_date;
document.cookie=the_cookie

var the_cookie = “users_resolutiony=”+ screen.height ;
var the_cookie = the_cookie + “;expires=” + the_cookie_date;
document.cookie=the_cookie

}
//–>
</script>

 

use this code to access screen size

 

<? php

$x = $_COOKIE[users_resolutionx];
$y = $_COOKIE[users_resolutiony];
?>

Leave a Comment
post icon

Redirect to another page – JavaScript

<script type="text/javascript">
<!--
window.location = "http://www.example.com/"
//-->
</script>

This code can be used to redirect to another page, PHP progammer can use this code to redirect to another page
where PHP code

header("location:http://www.inoxh.com");exit;

does not work, or gives error.
Leave a Comment
October 30, 2011