如何在iframe上插入jquery datepicker?

时间:2015-04-24 07:11:18

标签: javascript jquery html iframe datepicker

所以我有我的功能(使用ajax):

function show_statsDays($element,$id)
{
    $objResponse = new xajaxResponse();
    $tpl = new PHPTAL();
    $tpl->setTemplate('templates/lightboxes/statsDays.tpl.xhtml');

    $data = array();

    /*Enregistrement du nombre d'acces par mois dans un tableau*/
    $objDatabase = QApplication::$Database[1];
}

我想做的是在iframe上插入一个datepicker(Jquery),我给我的函数

($tpl->setTemplate('templates/lightboxes/statsDays.tpl.xhtml');

我的iframe(statsDays.tpl.xhtml)就像这样

<?xml version="1.0"?>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

<div class="erreur">
    <div onclick="paper.clear();im_lightbox.close();" id="im_lightbox_coverpage" >
    </div>
    <div style="padding:10px; display:none; width:700px; height:550px; margin-top:-275px;" id="im_lightbox_container">
        ...
        <div class="navig_stats">
            <ul>                                
            ... 
               <script>
                $(document).ready(function() {
                    $("#datepickerMois").datepicker({dateFormat: "yy-mm-dd"}.onSelect:function(xajax_show_statsMonth));;
                    });
                </script>   
            </ul>
        </div>

0 个答案:

没有答案