Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Wonderful system. So easy and so powerful! Very easy jump up from Access without knowledge in mySQL and PHP.
Is it possible change style (color of text or background) for specific row in Browse form? Is there equivalent javafunction nuLoadThis() for Browse form like in Screen form? Function that execute at start of Browse form and I can change it.
//--changing style in a Browse Form
$s = <<<EOSQL
CREATE TABLE #browseTable# SELECT
customer_id,
cus_code,
cus_phone,
cus_mobile,
cus_fax,
IF(LEFT(cus_name,1)="J", CONCAT('<b>',cus_name,'</b>'),cus_name) AS cus_name
FROM customer
EOSQL;
nuRunQuery($s);
//--running JavaScript on a Browse Form
$j = <<<EOJS
function nuLoadThis(){
alert('Customer Names Starting with "J" have been highlighted');
}
EOJS;
addJSfunction($j);
After that manipulations on Customer browse form customer that start with "J" now bold.
But something strange happened. When this Customer form with modify "Browse before" use as lookup form all goes wrong. Customer "J" still bold but when you click on it nothing happened. I say about lookup form.
You can see when creating new invoice on the Financial Module.
As I find it happened after you override function nuLoadThis().
--
Maxim
Sorry for my poor English. Hope you understand all clearly.
So I found that this some problem with addJSfunction($j); function. If I use it javafunction doIt(pID) despaired from source of form.
As I understand doIt dynamically add when form use as Lookup form.
If use this simple code in Before Browse then select for lookup doesn't work.
Here my approach for modify browse form using Javascripts.
So task was for invoice in my system show in lookup form for choosing item only active item. In separate form (item property) sales manager can choice for specific customer that item active and that inactive. And this state will change couple of time and invoice_items and products relationship together because of it impossible using only SQL with where statement.
Then you have two function nuLoadThis(). One in JavaScript of Main Screen form and other in Before Browse of lookup form.
Only JavaScript in Before Browse of lookup form will execute.