A simple memory program to demonstrate keypress navigation and crossdomain request using php The program demostrates how to sned crossdomain request using PHP and ajax.
PHP 5.1+ and apache /IIS server
- Extract the contents of the zip file to the server.
- Open the index.html file in Firefox browser. TESTED ON FIREFOX 23.0.1
To overcome cross domain server request error, I used php script to get the color data from the server. Alternate solutions I researched
- ADD THE PHP header("Access-Control-Allow-Origin: http://www.youdomain.com/"); to server
- Header set Access-Control-Allow-Origin: http://www.yourdomain.com/ to .HTACESS file.
- Using jsonp dataformat to return the data from the server will eliminate the need for changes on the server. Application URL: http://greatertamil.com/portfolio/memory
Contact: [email protected]