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

  • SEARCH
  • Home
  • 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 6776863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:04:46+00:00 2026-05-26T16:04:46+00:00

I am attempting to click a button when the onClose event occurs for fancybox.

  • 0

I am attempting to click a button when the onClose event occurs for fancybox.
I am thinking that I just have a syntax issue, but I am not completely sure. Here is my code. :

<script type="text/javascript">
        var $_returnvalue = false;

        $(document).ready(function () {

            $(".stopNumberLnkItem").fancybox({
                'width': '85%',
                'height': '85%',
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'speedIn': 400,
                'speedOut': 400,
                'type': 'iframe',
                'showCloseButton': true,
                'onClosed': function () {
                    if ($_returnvalue = 'Y') {
                        $('#Chkbxaddto').attr('checked', 'checked');
                    }
                    $(".gridStopSelectorListLnkItem").trigger('click');
                }
            });
        });

    </script>

Here is my linkbutton that I am attempting to click via the trigger(‘click’) above. :

<asp:LinkButton runat="Server" ID="RefreshGridStopListButton" Text="Refresh Grid Stop List" CssClass="gridStopSelectorListLnkItem"
                          OnClick="RefreshGridStopListButton_Click" Font-Size="smaller" Visible="true"/>

I have been trying different selectors and different ways of performing the click but to no avail. I have stepped through with IE developer tools but it does not seem to be clicking that button. Any thoughts on this one would be greatly appreciated.

Thanks.

  • 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-05-26T16:04:47+00:00Added an answer on May 26, 2026 at 4:04 pm

    depends how that linkbutton is rendered in the HTML. If it’s a <button> or I think also a <input type='button'> then you could just do $(".gridStopSelectorListLnkItem").click() but if it’s a <a> not sure if click() applies to that (but you can try)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following try catch block that executes on a button click. try
I am attempting to making a method that on a button click, it will
I'm attempting to call startActivity(myIntent) from the click of a menu button but my
I'm attempting to sort a ListView using C#, but whenever I click the sort
I have a small problem. I'm attempting to catch the OnUnLoad Event of the
I have a button on a form that is dynamically spawning a select list,
I have an application that I am attempting to build on Mac OS X
I have a set of data that has been displayed as just a simple
I'm attempting to use an XBAP to acquire TWAIN Images but I'm not even
Attempting to print out a list of values from 2 different variables that are

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.