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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:45:46+00:00 2026-05-25T18:45:46+00:00

I am trying to add the same ajax call that gets triggered when a

  • 0

I am trying to add the same ajax call that gets triggered when a checkbox is changed to a input field.

Here is the function that I also want to add when the value of the input field is changed:

                        $('#left input:checkbox').change(function() {
                                        $('#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);
                        }
        });

Here is my slider code. Which updates the input field:

                       $("#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'));

Here is my html:

<div class="sliderdiv">
    <div id="slider"></div>
    <input type="text" style="display:none;" size="30" name="search[prisar_greater_than]" id="sliderValueplads">
</div>

I have tried to replace this line in the code:

$('#left input:checkbox').change(function() {

With this (not working):

$('#left input:checkbox', '#sliderdiv input').change(function() {

Update
I have tried clean up the code. The problem is that the callpage does not get triggerhed:

                                        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);
                                        }
        $('#left input:checkbox').change(callpage);  

And I get this error in firebug:

missing } after property list [Break ved denne fejl] $('#left input:checkbox').change(callpage)
  • 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-25T18:45:46+00:00Added an answer on May 25, 2026 at 6:45 pm

    The change event won’t fire on the text box if you change the value via the jQuery code, you’d need to do something like this in your code –

    $('#sliderValue').trigger('change')
    

    to trigger the change event.

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

Sidebar

Related Questions

I have a javascript function that I am trying to add to my document,
I am really suffering here trying to get this ajax call to work, sorry
I'm trying to add a table row with ajax/jquery that has a form element
I am trying to call a function with Javascript, HTML, AJAX, and PHP. I
I'm trying add a tab to my web page that looks like this: Using
trying to add an ExpiresDefault ExpiresByType to content on my website so that way
I'm trying to do an ajax (restful service) call using $.get. It works perfectly
I am trying to add a click event on the element that is return
Just trying to see if I can add a definition/register AJAX web service explicitly
I'm trying to perform an AJAX-request in a view, the user gives some input

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.