AnsweredAssumed Answered

How to call ajax function with specific action?

Question asked by Abhi Abhi on Nov 19, 2014
Latest reply on Feb 4, 2015 by Abhi Abhi
Hi All

i have created a controller with action subscribers

like this
class LeadsController extends SugarController
{
  public function action_subscriber()
     {
      $this->view = 'sub';    
     } 
}

and i have added a button callled as subscribers in my search form

now on click on that button if i want to make search happen so i am calling SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form); this two function

Hi All

i have created a controller with action subscribers

like this
class LeadsController extends SugarController
{
  public function action_subscriber()
     {
      $this->view = 'sub';    
     } 
}


and i have added a button callled as subscribers in my search form

now on click on that button if i want to make search happen so i am calling SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form); this two function


but when i click on the button its going to

module=Leads&action=index

i want to trigger a ajax or ( i want to make search with )

module=Leads&action=subscriber

so how can i change the action on click of "SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form); this function


please can any one guide me on this ????/

i have also tried with this SUGAR.ajaxUI.submitForm(document.forms) ??


so how can i change the action on click of "SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form); this function ????????????/ unsure

Outcomes