onchange event

Questionsonchange event
Chao Shun Jenq asked 11 years ago

Hi,Abu,

In this sentence:
$col["editoptions"]=array("onchange"=> array("sql"=>"select * from table",
"search_on"=>"key","callback"=> "init_field"));

May I modify it into:
$col["editoptions"]=array("onchange"=> array("value"=>"this.value.toUpperCase()","sql"=>"select * from table",
"search_on"=>"key","callback"=> "init_field"));

Can it work??

Rgds,

1 Answers
Abu Ghufran answered 11 years ago

It wont work. Alternate would be to make values to uppercase, when filling select dropdown.
See UPPER(name) in code below.

$str = $g->get_dropdown_values("select distinct UPPER(name) as k, name as v from clients");
$col["editoptions"] = array(
"value"=>$str,
"onchange" => array(
"sql"=>"select * from clients",
"search_on"=>"name",
"callback" => "fill_form" )
);

Your Answer

19 + 18 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?