Monthly Archives: November 2011

Validating url using javascript

Some times we might need to check if the url entered by the user in the text box is a valid one or not. Here is a sample code to check that. <html> <head> <script> function checkUrl() { var theUrl=document.getElementById(‘url’).value;

Posted in Javascript Tagged with: ,

Generating a captcha code using PHP

This script generates images (known as “Captcha’s”) which contain security codes used for protecting a form from spam bots. By encoding a ‘password’ inside an image and asking the user to re-enter what they see you can verify the user

Posted in Php Tagged with: ,

Javascript code for selecting/de-selecting all Checkboxs

Check boxes in web pages allow the users to select multiple options while they fill out a HTML form. If the HTML form consists of large number of checkboxes , then individually selecting and de-selecting all the checkboxes will be

Posted in General Tagged with: , ,

print_r() Versus var_dump()

There are many functions available in PHP to debug a variable. This function can be used to store value in an array or other another object and it is important to troubleshoot the codes. Let us see some of them

Posted in Php Tagged with: , ,

Deleting Session Cookie in Webbrowser control.

Cookies are used in websites to store user information which in turn improves the user experience. C#.net has a webbrowser control that helps to create application helpful to navigate and crawl website automatically. It will be required to delete these

Posted in c# Tagged with: , ,

Javascript to count the number of times user clicks on a button

In some scenarios we might need to count the number of times a particular user has clicked a button or any other element in a web page. There is no direct way like a static variable to count the number

Posted in Javascript Tagged with: , , ,