onchange event

Questionsonchange event
Chao Shun Jenq asked 5 years ago


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??


1 Answers
Abu Ghufran answered 5 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(
"onchange" => array(
"sql"=>"select * from clients",
"callback" => "fill_form" )

Your Answer

10 + 12 =

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 / 5. Vote count:

As you found this post useful...

Follow us on social media!

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

Let us improve this post!