弹出面板中没有使用Datepicker [英] Datepicker is not worked in Popup Panel
本文介绍了弹出面板中没有使用Datepicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
如何在动态数据加载的textbox.ie中为datepicker添加Jquery,当我点击一个按钮时,包含来自外部页面的文本框的弹出窗口将显示在当前页面中。在那个文本框中我需要使用datepicker。
Hi
How to add Jquery for datepicker in dynamically data loaded textbox.i.e., When i am click a button , the popup containing textboxes from external page will shows in the present page. in that textbox i need to use datepicker.
<script type="text/javascript">
function manageapp(id,apcno)
{
/*alert(id);
alert(apcno);*/
//alert(dd);
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
req=new XMLHttpRequest();
}
else
{// code for IE6, IE5
req=new ActiveXObject("Microsoft.XMLHTTP");
}
var strURL="manage_ajx.php?id="+id+"&acpno="+apcno;
if (req)
{
req.onreadystatechange = function() {
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200)
{
document.getElementById('show_details').innerHTML=req.responseText;
} else {
alert("There was a problem while using XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
</script>
For Popup Panel Code :
<script type="text/javascript">
//New Pop up
$(document).ready(function() {
$('#inline').hide();
$('.login-window').click(function() {
$('#inline').addClass("login-popup");
$('#inline').css({'visibility':'visible'});
// Getting the variable's value from a link
var loginBox = $(this).attr('href');
//Fade in the Popup and add close button
$('#inline').fadeIn(300);
//Set the center alignment padding + border
var popMargTop = ($(loginBox).height() + 24) / 2;
var popMargLeft = ($(loginBox).width() + 24) / 2;
$('#loginBox').css({
'margin-top' : -popMargTop,
'margin-left' : -popMargLeft
});
// Add the mask to body
$('body').append('<div id="mask"></div>');
$('#mask').fadeIn(300);
return false;
});
// When clicking on the button close or the mask layer the popup closed
$('a.close, #mask').live('click', function() {
$('#mask , .login-popup').fadeOut(300 , function() {
$('#mask').remove();
});
return false;
});
});
</script>
Fowolling PHP代码:
Fowolling PHP Code :
<a class="login-window" href="#inline" title="Business Details" onclick="javascript:manageapp('<?php echo $patientlist[$i]['ap_id']; ?>','<?php echo $patientlist[$i]['apc'];?>')">
<img src="images/calendar-icon.png" title="manage appointment"/>
</a>
推荐答案
( document ).ready( function (){
(document).ready(function() {
(' #inline')。hide();
('#inline').hide();
(' .login-window')。点击( function (){
这篇关于弹出面板中没有使用Datepicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文