= 1900; $i--) { if (substr($i, 0, strlen($pValue)) == $pValue) { array_push($aArray, $i); } } return $aArray; } // Register functions $objPRAjax->RegisterFunction('Suggest'); $objPRAjax->RegisterFunction('SuggestYear'); // Handle PRAjax client request $objPRAjax->HandleClientRequest(); ?> Auto-suggest GetJavaScript(); ?>
This example shows a Google-suggest-like text field, which shows a list of possible values upon typing. These values are loaded while you type, using a PRAjax back-end and the PRAjax suggest component (adding an attribute to your text field is enough). Try filling in your country name.
View code...
Your country:

Your birth year: