For lazy phpers, with this function you can read cookies and get parameters in javascript in php style.
(I use php tags to highlight the code)
Example
<?php
populateRequest();
if( $_COOKIE['sid'] ) {
// do something
}
if( $_GET['cmd'] == 'login' ) {
// do something
}
?>
Most of the sites have this problem, for example, when user want to create an account. The fill in the registration from, and submit the form. If the site is too slow at that moment. they would click again, and you have double entries.
With this JavaScript class, you deactivate this. Just put that and end of your site.
function ClickObServer(){
this.deactivateDoubleClicks = function() {
this.checkClicks(document.getElementsByTagName("a"));
this.checkClicks(document.getElementsByTagName("input"));
}
this.checkClicks = function ( el ){
for (var i = 0; i < el.length; i++) {
Recent comments
49 weeks 4 days ago
1 year 6 weeks ago
1 year 10 weeks ago
1 year 33 weeks ago
1 year 37 weeks ago
1 year 37 weeks ago
1 year 44 weeks ago
1 year 44 weeks ago
1 year 44 weeks ago
1 year 44 weeks ago