Get the Current page Title, Description and Url using JavaScript

<div id="Box">
<script type="text/javascript">
var a = (document.title);
var b = (document.location.href);
var c = document.getElementsByTagName('meta');
var description;

for (var x=0,y=c.length; x<y; x++) {
  if (c&#91;x&#93;.name.toLowerCase() == "description") {
    description = c&#91;x&#93;;

document.write('<a href="'+b+'">'+a+'<\/a><br />'+description.content+'<br />');
document.write('<span id="green">'+b+'<\/span>');


Mootools – not finished
MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.

Remote full backup using cron job

If you want to make a Full Backup using cron job and transfer it via ftp to a remote server, you can use this script
Download it from here :
extract the file and open fullbackup.php and configure the following lines


// Info required for cPanel access
$cpuser = "*********"; // Username used to login to CPanel
$cppass = "*********"; // Password used to login to CPanel
$domain = "*********"; // Domain name where CPanel is run
$skin = "x3"; // Set to cPanel skin you use (script won't work if it doesn't match). Most people run the default x theme

// Info required for FTP host
$ftpuser = "***************"; // Username for FTP account
$ftppass = "***************"; // Password for FTP account
$ftphost = "***************"; // Full hostname or IP address for FTP host
$ftpmode = "ftp"; // FTP mode ("ftp" for active, "passiveftp" for passive)
$ftpport = "21";
$ftpdir = "/";

save it and upload to your home directory and login to your Cpanel and add this line to the cron job

/usr/local/bin/php /home/xxx-your directory-xxx/fullbackup.php

have fun


//2008-10-14 00:00:00
$beginDate = date("Y-m-d H:i:s", strtotime( $_POST&#91;'beginDate'&#93;));
$endDate = date("Y-m-d H:i:s", strtotime( $_POST&#91;'endDate'&#93;));

$query="SELECT Email FROM Customer WHERE UDFDate2 BETWEEN '$beginDate' AND '$endDate' ";

How to Show hide toggle display a DIV using javascript?

If you want to show/hide a div, you are on the right place here is an example

<input type=button value="Please click here" onClick="javascript:toggle()">
function toggle(){
	var div1 = document.getElementById('welcomeform')
	if ( == 'none') { = 'block'
	} else { = 'none'
<div id="welcomeform" style="display:none;">Welcome :-)</div>

Preventing A Form To Submit If A Field Is Empty

With this code, it alerts the user when the form is empty, but still submits it when the user clicks [OK]

<script type="text/javascript" language="JavaScript">
function nameempty()
        if ( == '' )
                alert('No name was entered!')
                return false;

<form action="submit.php" method="post" name="formname" onsubmit="return nameempty();">
<input type="text" name="name" class="textfield">
<input type="submit" value="Submit" name="submit">

Pin It on Pinterest