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 5847849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:46:37+00:00 2026-05-22T12:46:37+00:00

I am using a function to trigger when any of a particular set of

  • 0

I am using a function to trigger when any of a particular set of anchors are clicked.
This works in Firefox 3 and Chrome.

They don’t exist when the page first starts loading as they are being created by XML+XSLT using client side transformation, just in case this is relevant some how.

I also only put that alert in there just to see if it was even doing anything… not even an alert in IE. It was not working in Chrome but that was because I was missing $document.ready statement [still worked in FF] but I am not sure what the missing element is for IE. I am using IE 8 btw.

        <script type="text/javascript">
        $(document).ready(function () {
            $("#BlogSelectList li a").click(function () {
                alert('hhi')
                var str = ($(this).attr("href")).slice(1, 37)
                $.ajax({
                    contentType: "application/json; charset=utf-8",
                    url: '../ws/WebServices.asmx/SetActiveBlog',
                    data: '{ActiveBlogID: "' + str + '"}',
                    dataType: 'json',
                    type: "post",
                    success: function (j) {
                            window.location.href = 'dashboard.aspx'
                    }

                });

            });
        })
    </script>
  • 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-22T12:46:38+00:00Added an answer on May 22, 2026 at 12:46 pm

    It probably is relevant that the anchors are not there when the doc first loads. You could do a quick fix by using the live method. This will apply your event to whatever you’re selecting even if it’s added to the DOM later.

    $("#BlogSelectList li a").live("click", function() {etc...});
    

    Also, if you’re using an anchor, you will probably need to set the href attribute to “#” so that it doesn’t trigger the browser default behavior of navigating somewhere.

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

Sidebar

Related Questions

How do I trigger this inline function onClick=showMenu('mnu_searches', event, 0, this) using JQuery...if I
How do you trigger a javascript function using actionscript in flash? The goal is
I've been using this function but I'd like to know what's the most efficient
I am trying to load a dynamic library using dlopen function. This library contains
I'm combining Tablesorter's ' disable headers using options ' function and the ' trigger
how do i get the value of a function i'm using to trigger an
What are the steps to estimating using function points? Is there a quick-reference guide
I'm trying to use the Seq.generate_using function but unfortunately, I don't seem to be
I've got an empty DIV element in which I append images by using function
I have been using PRETTY_FUNCTION to output the current function name, however I have

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.