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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:11:30+00:00 2026-05-26T11:11:30+00:00

Having trouble getting success from this… <!– Ajax –> <script type=text/javascript> $(‘a.clickup’).click(function (event) {

  • 0

Having trouble getting success from this…

<!-- Ajax -->
<script type="text/javascript">
$('a.clickup').click(function (event) {
event.preventDefault();
$.ajax({
    type: 'get',
    url: "actions.php",
    data: "action=10&moveMe=<?php echo $row_rsChkOptions['chkID'] ?>&startPos=<?php echo $row_rsChkOptions['orderID'] ?>&parentCategory=<?php echo $row_rsChkOptions['categoryID'] ?>&chklistID=<?php echo $row_rsChkOptions['chklistID'] ?>"
    success: function (data) {
            alert('success');
}
});
</script>

Normally, when I would just want the page to reload, I would set the href to:

actions.php?action=10&moveMe=<?php echo $row_rsChkOptions['chkID'] ?>&startPos=<?php echo $row_rsChkOptions['orderID'] ?>&parentCategory=<?php echo $row_rsChkOptions['categoryID'] ?>&chklistID=<?php echo $row_rsChkOptions['chklistID'] ?>
});

What am I doing wrong here? I am not getting my success alert.

  • 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-26T11:11:31+00:00Added an answer on May 26, 2026 at 11:11 am

    One problem could be that you have not wrapped your code in a jQuery load function, such as this:

    <script type="text/javascript">
    $(function () {
        $('a.clickup').click(function (event) {
            event.preventDefault();
            var data = "action=10&moveMe=<?php echo $row_rsChkOptions['chkID'] ?>&startPos=<?php echo $row_rsChkOptions['orderID'] ?>&parentCategory=<?php echo $row_rsChkOptions['categoryID'] ?>&chklistID=<?php echo $row_rsChkOptions['chklistID'] ?>";
            $.get("actions.php", data, function (data) {
                alert('success');
            });
        });
    });
    </script>
    

    This reason I suggest this is that trying to apply a click function handler on a DOM element when the DOM element hasn’t fully loaded by the browser can cause problems. Wrapping your code in a jQuery load function such as this will take care of that problem if that is indeed what is happening. I also took the liberty of rewriting your $.ajax function call to make it a little easier on the eyes. But that is purely subjective!!

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

Sidebar

Related Questions

I'm having trouble getting a response back from a Jquery ajax call... (It's a
Having some trouble getting this query to work correctly. mysql_query(DELETE FROM `table` WHERE `id`
Having trouble getting the javascript alert to display from my code behind. c# -
I am having trouble getting a success: function(){} working - the ajax code I
I am having trouble getting the contents of JSON object from a JQery.ajax call.
I'm having trouble handling a JSON object that I'm getting back from an AJAX
Having trouble getting this to work: /// <summary> /// Retrieve search suggestions from previous
I am having trouble getting dynamic content coming from a custom handler to be
I am having trouble getting inside my Search WebMethod from my JQuery call. Maybe
Having trouble getting the following code to work: $('#changeMode').button().click(function(){ $('#playfield').toggle(function() { $(this).switchClass(gridView,plainView); }, function()

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.