Archive for the 'Javascript' Category

Javascript Image Cropper with Mootools and PHP

MooCrop is a library which can be used to create a cropping interface in your webpage. With this library after a crop region is selected a php script can be called to crop the image on serverside. The moocrop interface provides four values that is the width , height , left and top of the [...]

Javascript Optimization Techniques

More and more sites have begun using javascript to implement a wide array of features like DHTML, AJAX and various type of validations and processing
Reduce the size of javascript source code

Detecting and Confirming browser window close/navigation events

onunload event didnt quite work in mozilla or internet explorer
another event called onbeforeunload gives a better desired effect

window.onbeforeunload = function unloadEvent()
{
return ("Are you sure you want to navigate away from the page.");
}

or still better

window.onbeforeunload = function unloadEvent()
{
return ("");
}

for just a confirmation.
This event is available on Mozilla and Internet Explorer [...]