Show popup under specific asp control
I am working with a textbox in ASP.NET and I added a JavaScript that pop up Calendar control on "OnClick" event (I am using window.open() to open the popup). Is there any way I could show the popup right under the textbox?
Thanks.开发者_如何转开发
Why are you using window.open? Have you looked into jQuery using a a DIV popup?
You can also use jQuery to find the location of your textbox and place the popup near the X,y offset of you textbox.
try this one
download the jquery and jquery ui
add the jquery and jqueryui reference to the asp.net project
insert this code in script tag
$(document).ready( function()
{
$("input[id$='txt_Date']").datepicker();
});
when you click the textbox it will show the calendar.
精彩评论