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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:34:23+00:00 2026-06-09T14:34:23+00:00

I hava a HTML program which uses AJAX.THe responseText of the AJAX will be

  • 0

I hava a HTML program which uses AJAX.THe responseText of the AJAX will be printed on a DIV. Inside that DIV already exist a <input tpe="text value="" id="fechaD" />. I have a JQuery function that is called when the input is clicked. Obviously, that input will be replaced by the responseText of the AJAX, so I added again on the responseText. The problem comes that now the JQuery does not work.

I dont know if the <script type="text/javascript"> with the jQery function should be outside the DIV so it wont be replaced by the response of AJAX, or should be added again as a responseText. I already try both and wont worked.

I have tried this whithout using jQuery and it works, so I think this should have something to do whith my function in jQuery, but my problem is that I didnt programmed that function, because I dont know anything abaout jQuery.

Here is the jQuery Function that works when the input in onclicked:

(The function looks for the ID=”fechaD” and displays a Calendar. When the User selects any date, then the date will appear as the input’s value. After using AJAX, it wont detect the new ID=”fechaD” input).

    <script type="text/javascript">
        jQuery(function($){
            $.datepicker.regional['es'] = {
                monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
            };
            $.datepicker.setDefaults($.datepicker.regional['es']);
        });    
        $(document).ready(function() {
                $("#fechaD").datepicker();
        });
    </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-06-09T14:34:24+00:00Added an answer on June 9, 2026 at 2:34 pm

    If you replace the #fechaD input, the new one will no longer have a datepicker instance associated with it.

    To solve it, you can either:

    1. Call $('#fechaD').datepicker(); again after replacing it (creates a new datepicker instance);
    2. Move the #fechaD input outside of the area which you’re replacing (recommended).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hava a NSString which uses $ as delimiters, e.g. NSMutableString *str = @AA$BB$CC;
I hava a Java program that needs to monitor a directory tree for changes.
I have got a div that needs to have a fixed height and will
I hava set up AJAX script that when you click the button it calls
I have using beautifulsoup to extract datas. I hava such a html file: <div
I hava a HTML page on server. consider an article example is loaded in
I hava an activity which might have to load data when it's starting up.
I hava a UITextView ,and after some characters' input, I want to use a
I hava a data window object, in which I am fetching some attributes from
I hava a script that consist of hello world and the hello and world

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.