function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nagesh B 13Nagesh B 13 

Inline if else condition or ternory operator used on oncomplete in VF?

Hi All,

is any one used inline if else condition or Ternory operator usage on oncomplete in VF. based on that i wanna call different java script functions based on variable. please let me know the syntax if any body knows and if it is possible.

Thanks,
Nagesh B
Nagendra ChinchinadaNagendra Chinchinada
Hi Nagesh,
Try this,
 
<apex:actionSupport  oncomplete="IF(condition,IfFunction();,ElseFunction();)"  status="SearchingStatus" />



one more way  is,
call a JS function from oncomplete method by passing required parameters, in that JS function use If , Else conditions to perform logic or call other JS functions from if, else.

Let me know if it helps.
Nagesh B 13Nagesh B 13
Thanks Nagendra. :)