Developer FAQ
January 7, 2013
December 6, 2012
enableAjaxValidation and enableClientValidation in Yii CActiveForm Widget
When enableAjaxValidation set to true, it makes the form doesn't refresh the page to validate form input. So, it will send an ajax response, when we submit the form.
While enableClientValidation allows us to validate form input via javascript if possible.
And don't forget to set validateOnSubmit to true in clientOptions property.
To make it clearer, below several case given.
1. enableAjaxValidation=false and enableClientValidation=false
Every submission of form will refresh or request page to validate form input.
2. enableAjaxValidation=false and enableClientValidation=true
Every input which is possible to be validated like required field, email field will be handled by javascript, before processing to request/refresh page to server.
3. enableAjaxValidation=true and enableClientValidation=false
Every input will be validated by server side but will not refresh the page, it will do an ajax request for validation.
4. enableAjaxValidation=true and enableClientValidation=true
This one will do an ajax request after doing some possible validation via javascript, like I said before, such as checking required field or email field. And another type of validation like duplicate checking will be handle by an ajax request to server.
This is code snippet for instantiating a Yii CActiveForm widget in case no. 4.
While enableClientValidation allows us to validate form input via javascript if possible.
And don't forget to set validateOnSubmit to true in clientOptions property.
To make it clearer, below several case given.
1. enableAjaxValidation=false and enableClientValidation=false
Every submission of form will refresh or request page to validate form input.
2. enableAjaxValidation=false and enableClientValidation=true
Every input which is possible to be validated like required field, email field will be handled by javascript, before processing to request/refresh page to server.
3. enableAjaxValidation=true and enableClientValidation=false
Every input will be validated by server side but will not refresh the page, it will do an ajax request for validation.
4. enableAjaxValidation=true and enableClientValidation=true
This one will do an ajax request after doing some possible validation via javascript, like I said before, such as checking required field or email field. And another type of validation like duplicate checking will be handle by an ajax request to server.
This is code snippet for instantiating a Yii CActiveForm widget in case no. 4.
March 16, 2012
Execute a HTTP POST Using PHP CURL
The source for these problem actually from http://davidwalsh.name/execute-http-post-php-curl
Look at the example code below
Related keyword: PHP cURL Exampe, PHP cURL Tutorial
Look at the example code below
Related keyword: PHP cURL Exampe, PHP cURL Tutorial
Call web page using cron job
It doesn't matter if it's an external web page(not in the same host). You can use the following command in cron job.
lynx -dump http://www.anydestination.com
Hope this help you.
Source: http://forums.cpanel.net/f5/cron-job-call-web-page-60253.html#post282325
Related keyword: execute php file using cron job
lynx -dump http://www.anydestination.com
Hope this help you.
Source: http://forums.cpanel.net/f5/cron-job-call-web-page-60253.html#post282325
Related keyword: execute php file using cron job
Labels:
cron job
August 14, 2011
August 11, 2011
Get Keyword of a Web Page Searched from Google, Yahoo, or Bing
Below is the demo, which will show you what keyword that you're searching for from Google, Yahoo, or Bing.
Labels:
Javascript
Get URL Referrer from Javascript
This is the simple code to get url referrer to a web page.
You can see the demo below
You can see the demo below
Subscribe to:
Posts (Atom)