Header menu

_________________________________________________________________________________

Saturday, 9 August 2014

Ajax Simple Captcha on jquery Dialog form


 

Ajax  Simple Captcha on jquery Dialog form

CAPTCHA  is a type of challenge-response test used in computing to determine whether or not the user is human. Adding captcha to html/php page is simple task . But its not so easy in jquery dialog form for newbies . So lets implement a simple captcha for jquery dialog form.

I will use 4 files :
1. index.php ( Contains html form, javascript code to send ajax request)
2. captcha.php ( Create captcha image)
3. captcheck.php ( Check weather value entered for captcha is right or wrong)
4. post.php ( Page where form submits if captcha validation is fine)
index.php

Friday, 25 July 2014

Table data overflowing even after giving fixed width due some long string .


 

Table data overflowing even after giving fixed width due some long string .

After giving fixed width to table and column ,we suppose that we will get same type of table every time. But sometime due to some long string which is greater than width of column , table overflows of given width.

To tackle that problem add these two small lines to your style:



Firstly , give fixed layout out to table and secondly add word-wrap: break-word; property to column . And you are all done :)

Tuesday, 27 May 2014

Extract parameters from url using javascript or jquery in html file.


 

Parsing url in jquery or javascript to extract parameter from url in html file


If you are using a html file and you have to receive some parameters from url , then
below is the method you are looking for.

Only this you have to do ... is to call getUrlVars with field name to extract as done in this statement  :

var first_name = getUrlVars()["first_name"];  


Tuesday, 20 May 2014

In how ways you can add css to a html page ?


 

Methods to add css to html page :

We can add css to a page using 3 methods :

a) External css
b) Internal css 
c) Inline css 

External css : In this we make an css file and then call that file in our page using link .
      

Internal css : In this we write our css in head of the the html page using style tag.
               

Inline css : In this we add style to the element . 

The best method of adding css is external and the most powerful is inline because override    previous css included.

Thursday, 15 May 2014

Use of RedirectMatch 301 directive in htaccess.


 

Use of  RedirectMatch 301 directive in htaccess.

To redirect more than a single page using htaccess, you can use the "RedirectMatch 301" directive, which allows you to specify directory matching patterns using regular expressions.

Here  301 redirect is a permanent redirect method which passes between 90-99% of  ranking power to the new redirected page and (?i) signifies case insensitivity .

Point to remember:

1. (?i) starts case-insensitive mode
    (?-i) turns off case-insensitive mode

2.  /directory/cart   This is the directory which i am redirecting . When this directory structure will occur in url , page will be redirected to stated page.

3.   http://localhost/directory2?   This is my new address where i want page to be redirected.