+ Start a Discussion
SiddharthSiddharth 

Can we call javascript and ActionSupport together on SelectList

I want a JS validation on my Visualforce page before i call ActionSupport, but it seems this is not possible below is the snippet, can someone point out if I am doing something incorrect here.
 

<apex:selectList id="PeriodOptions" value="{!PeriodOptions}" size="1" onclick="return ValidateShowAll();">

<apex:selectOption itemValue="1" itemLabel="This Month" />

<apex:selectOption itemValue="2" itemLabel="Last Month" />

<apex:selectOption itemValue="3" itemLabel="Last Year" />

<apex:actionSupport action="{!FilterCampaigns}" event="onchange" rerender="MainPanel">

</apex:actionSupport>

 

If I remove my javascript my action support functions good, but I need to validate my page before invoking this. Other possibility could have been if i can use AJAX call from javascriot but i need to rebind my panel with updated data.

Can some some one help me out.

 

Thanks

Siddharth

NiketNiket

Hi Siddharth ,

 

were you able to resolve this ?