what is the right way too add script to php page. i have the code with html and it work fin
it is very important for me to work without html tag.Code:<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <link rel="stylesheet" href="./js/jquery.calendars.picker.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="./js/jquery.plugin.js"></script> <script src="./js/jquery.calendars.js"></script> <script src="./js/jquery.calendars.plus.js"></script> <script src="./js/jquery.calendars.picker.js"></script> <!--<script src="jquery.calendars.picker.ext.js"></script><!-- Include for ThemeRoller styling --> <script src="./js/jquery.calendars.ummalqura.js"></script> <script> $(function() { var calendar = $.calendars.instance('ummalqura'); $('#popupDatepicker').calendarsPicker({calendar: calendar}); }); function showDate(date) { alert('The date chosen is ' + date); } </script> </head> <body> <p><input type="text" id="popupDatepicker"></p> </body> </html>
this is the Source link: http://keith-wood.name/calendarspicker.html
underneath my best try but still not work
Code:<?php echo('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>'); echo('<script src="./js/jquery.plugin.js"></script>'); echo('<script src="./js/jquery.calendars.js"></script>'); echo('<script src="./js/jquery.calendars.plus.js"></script>'); echo('<script src="./js/jquery.calendars.picker.js"></script>'); echo('<script src="./js/jquery.calendars.ummalqura.js"></script>'); ?> <?php echo "<script type=\"text/javascript\"> function javascript{ <script> $(function() { var calendar = $.calendars.instance('ummalqura'); $('#popupDatepicker').calendarsPicker({calendar: calendar}); }); function showDate(date) { alert('The date chosen is ' + date); } } </script>" ?> <?php echo " <input id='popupDatepicker' name='date' type='text'> "; ?>



Reply With Quote

Bookmarks