Wednesday, February 23, 2011

Change Page title using Javascript

Code to change the Page title using Javascript is shown below.

document.title = 'Page Title has been Changed using Javascript';


Monday, January 31, 2011

Auto Refresh a Div or an Element using Jquery

Below is the code to refresh a div or an element using Jquery.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Refresh</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
var auto_refresh = setInterval(
function()
{
$('#replace_content').load('
replace_content.php');
}, 1000);
</script>
<style type="text/css">
#shouts { background: #36F; height: 200px; overflow: auto; width: 300px; }
</style>
</head>

<body>
<div id="replace_content"><?php include'replace_content.php'?></div>
</body>
</html>



  



Thursday, December 30, 2010

HaPpY nEw YeAr 2011

Wishing you all a Happy & Prosperous New Year 2011...










Tuesday, December 7, 2010

Display Errors and Log errors in PHP

HTACCESS code to display errors(i.e Warnings & Fatal Errors) while running a PHP file in server is shown below.

php_flag display_errors off

HTACCESS code to log errors in Log file is php_flag log_errors. To off the Log files in the server we need to write the HTACCESS code as shown below.

php_flag log_errors off


To off the Errors displayed & also to OFF the log files the following HTACCESS code is used.


Options +FollowSymlinks
php_flag display_errors off
 
php_flag log_errors off