
Originally Posted by
vistar86
ok this sounds good, but where to start? any pointers? when i add custom php code to editview it makes css mess up.
do i need to add this code to editviewvardefs? or code in views/edit.view.php? or both?
where can i code the onblur event? and example?
do you or anyone have any examples, or link to a tutorial?
thanks for your response.
Hi Vistar,
For using javascript you have to do a lot of stuff bu my way.
Well it starts from creating javascript file in your cutom/modules/<module_name>/EditView.js
the file will contain code somthing like this:
Code:
window.onload = load;
function load(){
textboxid.onblur = function(){checkduplicate()}
}
function checkduplicate()
{
//your ajax functionality which will disable your save button if serial number is duplicated
} then you have to include your javascript file in your editviewdefs.php
it will look something like this
PHP Code:
'templateMeta' =>
array (
'includes' =>
array (
0 =>
array (
'file' => 'custom/modules/<module_name>/EditView.js',
),
),
'maxColumns' => '2',
'form' =>
hope this will be helpfull..
Keep rocking !!!
Bookmarks