开发者

working with Ajax popup

ok i need a pop up box to select date and time... but im having some trouble...

i used first modal popup (ajax) for the popup...

that is working but not looking neat...

then i put a textbox in it with t开发者_开发问答he calender extender...

the problem here is when i click on textbox calender pops up but it does not seem to work because nothing is getting selected... dont know why...

here is my code... if any one has any suggestions please.....

my code is:

 <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Panel ID="Panel1" runat="server" CssClass="ModalWindow" style="display:none;" >  

<asp:TextBox ID="TextBox2" runat="server" Width="200px"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" PopupPosition="Right" PopupButtonID="TextBox2"
TargetControlID="TextBox2" Format="dddd, MMMM dd, yyyy">
 </cc1:CalendarExtender>  
    <asp:TextBox runat="server" ID="txtHour"></asp:TextBox>
  <cc1:NumericUpDownExtender ID="txtHour_NumericUpDownExtender" runat="server"  Enabled="True" Maximum="12" Minimum="1" TargetControlID="txtHour" Width="70"></cc1:NumericUpDownExtender>

   <asp:TextBox runat="server" ID="txtMinute"></asp:TextBox>
   <cc1:NumericUpDownExtender ID="txtMinute_NumericUpDownExtender" runat="server" Enabled="True" Maximum="60" Minimum="1"  TargetControlID="txtMinute" Width="70"></cc1:NumericUpDownExtender>

   <asp:TextBox runat="server" ID="txtDayPart"></asp:TextBox>
   <cc1:NumericUpDownExtender ID="txtDayPart_NumericUpDownExtender" runat="server" Enabled="True" RefValues="AM;PM" TargetControlID="txtDayPart" Width="70"></cc1:NumericUpDownExtender>


    <br /><br /> 
     <asp:Button ID="btnOk" runat="server" Text="Ok" /> 
    <asp:Button ID="btnClose" runat="server" Text="Close Me" /> 
   </asp:Panel> 

   <cc1:ModalPopupExtender 
    BackgroundCssClass="modalBackground" 
    DropShadow="true" 
    OkControlID="btnOk" 
    CancelControlID="btnClose" 
   runat="server" 
   PopupControlID="Panel1" 
   id="ModalPopupExtender1" 
    TargetControlID="Button1" /> 

thanks

I cannot use Jquery for this... but just that why does the calender work with modalpopup

In IE the arrows to move the months is not working and in mozilla nothing is getting selected in the calender ... please help...


I got this running and it appears to work fine - the modal popup appears, i can select a date using the calendar and it populates the textbox.

As for the popup 'not looking neat' I'd suggest that's down to the ModalWindow class you've defined.

Can you elaborate on the error? Are you getting any JavaScript errors at all?

Are you trying to populate Label1? If so, you'll need to add a function call to the OnOkScript attribute of the ModalPopupExtender, something like this:

function populateLabel() 
{
document.getElementById("<%= Label1.ClientID %>").innerHTML = document.getElementById("<%= TextBox2.ClientID %>").value;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜