jquery - form input date picker not showing on ajax page -



jquery - form input date picker not showing on ajax page -

i've been trying utilize jquery datepicker on ajax page fails load.am developing web app on laravel framework , ajax when seek utilize jquery datepicker works if form on master page.but 1 time click on link loads new page div datepicker doesnt work there.and console isnt throwing errors.any thought might bee doing wrong.

here illustration on jquery website followed.

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jquery ui datepicker - default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> </head> <body> <p>date: <input type="text" id="datepicker"></p> </body> </html>

here ajax call

function makerequest(serverpage, objid) { var obj = document.getelementbyid(objid); obj.innerhtml = '<b>loading....</b>'; xmlhttp.open("get", serverpage); xmlhttp.onreadystatechange = function() { if (xmlhttp.readystate == 4 && xmlhttp.status == 200) { obj.innerhtml = xmlhttp.responsetext; } } xmlhttp.send(null); }

page trying load div

<form method="post" action="{{url::route('applicant.store')}}" class="user form-horizontal" enctype="multipart/form-data"> <br> <input type="text" id="datepicker"> <h4 class="text-center">enrollee registration form</h4> <!--div contain ajax passport--> <!-- <div id="passport" class="text-center" style="border:1px solid black;height:120px;width:120px;color:silver"></div> --> <!--surname , othernames--> <div class="form-group"> <div class="col-sm-1 col-md-offset-"> <label for="name">surname</label> </div> <div class="col-sm-4"> <input type="text" name="surname" required value="{{input::old('surname')}}" class="form-control"> </div> <div class="col-sm-1 col-md-offset-"> <label for="name">other names</label> </div> <div class="col-sm-4"> <input type="text" name="othernames" required value="{{input::old('othernames')}}" class="form-control"> </div> </div> <div class="form-group"> <div class="col-sm-2 col-md-offset-"> <label for="name">upload passport</label> </div> <div class="col-sm-3"> <input type="file" name="passport" class="form-control"/> </div> </div> <div class="col-sm-2 col-md-offset-"> <div> <label for="form_no">form no.</label> </div> <div class="col-sm-1"> <input type="text" name="form_no" value="{{input::old('form_no')}}" class="form-control" required> </div> <div class="col-sm-2 col-md-offset-"> <label for="tell_no">teller/reciept no.</label> </div> <div class="col-sm-2"> <input type="text" name="tell_no" value="{{input::old('tell_no')}}" class="form-control" required> </div> <div class="col-sm-1 col-md-offset-"> <label for="amt_paid">amount paid</label> </div> <div class="col-sm-1"> <input type="text" name="amt_paid" value="{{input::old('amt_paid')}}" class="form-control" required> </div> </div> <div class="form-group"> <div class="col-sm-1 col-md-offset-"> <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span>&nbsp;submit application form</button> </div> </form> </div> </div> </form> </div> </div> </div> </div> <script> $('document').ready(function(){ $( "#datepicker" ).datepicker(); $( "#regpicker" ).datepicker(); }); </script>

any help appreciated thanks

put of script references in master page mutual throughout application.so plugins initiated when master page loads not have add together references in kid pages , not have worry plugins.

jquery laravel

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -