Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7935307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:52:47+00:00 2026-06-03T21:52:47+00:00

I have filter-from with ajaxSubmitButton. CHtml::ajaxSubmitButton(‘Show’,Yii::app()->createUrl(‘office/ajaxFilter’),array(‘update’=>’#office-install’),array(‘id’=>’filterSubmit’)) And i want to submit it on pageLoad

  • 0

I have filter-from with ajaxSubmitButton.

CHtml::ajaxSubmitButton('Show',Yii::app()->createUrl('office/ajaxFilter'),array('update'=>'#office-install'),array('id'=>'filterSubmit'))

And i want to submit it on pageLoad (to recive data using default filter values). How to trigger click on ajaxSubmitButton?

using

  $(document).ready(function () {
    $('#filterSubmit').trigger('click');
}

raise redirect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:52:50+00:00Added an answer on June 3, 2026 at 9:52 pm

    If I understand your problem correctly, you need to trigger the click on #filterSubmit element to run some actions associated with it, but without having the page following the regular click, if so:

    UPDATE YOUR CODE TO THIS:

    $(document).ready(function () {
    
      // bind a click event to the button
      $('#filterSubmit').bind('click', function(e) {
    
        // the browser from following the click
        e.preventDefault();
      });
    
      // trigger the click on the button
      $('#filterSubmit').trigger('click');
    
      // unbind the click event to allow the normal usage of that button
      $('#filterSubmit').unbind('click');
    }
    

    This assumes that you have some click events binded to the #filterSubmit… If that is not the case, perhaps a more elaborated question cold allow us to help you out!


    EDITED

    By the comment you’ve just post, you can do something like:

    YOU CODE (with a minor fix):

    $(document).ready(function(){
    
      $('#filterSubmit').trigger('click');
    
    }); // was missing ); here
    

    WITH Yii Framework

    <?php
    
    // the script string
    $ourscript = "$('#filterSubmit').trigger('click');";
    
    // Yii’s registerScript
    Yii::app()->clientScript->registerScript(
                                'filtersubmitclickscript',
                                $ourscript,
                                CClientScript::POS_READY
                              );
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to filter out certain elements from an array in javascript and thought
Ok I have a basic iPad app that asks for 5 search/filter criteria from
I have a Filter Servlet that filters request from a Servlet. I do not
I have the following code to filter a grid from values inputed in a
I have a custom validation attribute derived from action filter attribute. Currently the attribute
I have a list of objects from a django queryset, e.g. my_list = MyObject.objects.filter(variable=something)
I have filter that I took from django but now I must import too
I have a custom DirectShow filter created by extending the ezrgb24 filter from the
I have Dim objectsList as List(Of Object) = GetAllObjects() ' Filter from Objects just
I have a drop down list that is used to filter data from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.