如何在具有多个参数的OnChange事件中的select下拉值上调用javascript

I am very new to this and I think I should not be mixing all of the things like client side and server side... but I can't think of any other option.

What I want is to accept dropdown selected value and write it back to DB using onChange function.

<div class="control-group" onChange="saveTasks('<?php echo $row["taskid"]; ?>', **this.selectedIndex** ,'vendorname')">

Problem is I am having PHP function too and this.selectedIndex as HTML function.

I have tried JS instead of this.selectedIndex as well (mentioned below):

<div class="control-group" onChange= "saveTasks('<?php echo $row["taskid"]; ?>', **myFunction()** ,'vendorname')">

but don't know what is right syntax.