-1

I have a page (form.php) that is called via ajax when a user group is clicked in main page. form.php contains form fields (like date picker etc and other fields as per usertype selection in main page. My issue is the when I click on any user type in main page form.php page load using ajax but date picker in this form is not working. I check all path and sequence but its not working.

here is my code

$.ajax({
                type: "GET",
                url: "services/forms.php",
                data: {UserType: UserType},
                success: function(data){
                    $('#assessmentform').html(data);
                }
            });
2
  • You can add jquery of datepicker or other on main page and initialize it after ajax response, then it will work Commented Jul 11, 2017 at 7:56
  • you have to load the datepicker function on ajax result, or define date picker js load when body is load. Commented Jul 11, 2017 at 7:58

1 Answer 1

1
$.ajax({
                type: "GET",
                url: "/services/forms.php",
                data: {'UserType': UserType},
                success: function(data){
                    $('#assessmentform').html(data);
                }
            });

try this if this file in outside the services folder

Sign up to request clarification or add additional context in comments.

1 Comment

is it working now? if helped dont forget to accept the ans

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.