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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:32:36+00:00 2026-05-25T19:32:36+00:00

How do I call this Jquery ajax call on jQuery slide change? function callpage()

  • 0

How do I call this Jquery ajax call on jQuery slide change?

function callpage() {
    $('#formcontent').empty().html('<p style="margin-top:20px;text-align:center;font-family:verdana;font-size:14px;">Vent venligst, henter webhosts.</p><p style="margin-top:20px;margin-bottom:20px;text-align:center;"><img src="../images/ajax.gif" /></p>');
    var form = $(this).closest('form');
    $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize(),
        success:function(msg){
            $('#formcontent').html(msg);
        }
    }

My jQuery slider code:

$("#slider").slider({
    value:'',
    min: 0,
    max: 5000,
    step: 250,
    slide: function(event, ui) {
        if (ui.value == $(this).slider('option', 'max')) {
            $(ui.handle).html('Ubegrænset');
            $('#sliderValueplads').val('99999');
        } else {
            $(ui.handle).html(ui.value + ' MB');
            $('#sliderValueplads').val(ui.value);
        }
    }
}).find('a').html($('#slider').slider('value'));

$('#sliderValueplads').val($('#slider').slider('value'));

My new slider code:

        $("#slider").slider({
    value:'',
    min: 0,
    max: 5000,
    step: 250,
    stop: function(_, ui){
    callpage();
},
    slide: function(event, ui) {
        if (ui.value == $(this).slider('option', 'max')) {
            $(ui.handle).html('Ubegrænset');
            $('#sliderValueplads').val('99999');
        } else {
            $(ui.handle).html(ui.value + ' MB');
            $('#sliderValueplads').val(ui.value);
        }
    }
}).find('a').html($('#slider').slider('value'));

The problem is that the ajax call is not made, but the HTML is replaced. Which is a little strange because I just have tested the callpage with this $('#left input:checkbox').change(callpage); and the callpage did work as expected

  • 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-25T19:32:37+00:00Added an answer on May 25, 2026 at 7:32 pm

    If you mean when the user stops moving the slider then bind it to the stop event in your constructor.

    stop: function(_, ui){
        callpage();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'have a js client with JQuery, this js call a page (GET HTTP) and
This is my first time attempting to call an ASP.NET page method from jQuery.
When I call this function, everything works, as long as I don't try to
I have a JavaScript function, pop_item . I have to call this from PHP,
I'm having some issues with a jQuery AJAX call. My code works fine when
This is probably a simple question. I use ASP.NET ajax toolkit and Jquery. I
Every time I call this method my NSMutableData is leaking and I cannot figure
If I get a NullPointerException in a call like this: someObject.getSomething().getSomethingElse(). getAnotherThing().getYetAnotherObject().getValue(); I get
I'd like to accomplish something like this: Call a method, say turn, and then
I'm trying to determine, based on the result of this call, if it was

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.