Click here to Skip to main content
16,014,568 members

Comments by Vasanth Gabriel (Top 2 by date)

Vasanth Gabriel 18-Jul-12 8:01am View    
<asp:TextBox id="date" onClick="javascript:return Calculate();" onfocus="Calculate(this);" AutoPostBack="false" runat="server" />
</td>
<td>

<asp:ImageButton ID="ImageButton1" ImageUrl="~/images/calendar_icon.png" OnClientClick="Calculate(); return false" runat="server" />
Vasanth Gabriel 18-Jul-12 8:01am View    
Hi taj,the below is my javascript function<
script type="text/javascript">

function Calculate() {
calendar.set("date");
calendar.set("date2");
calendar.set("ImageButton1");
calendar.set("ImageButton2");

return false; }

it works perfect when i am clicking textbox, but when i click the image button control? for the first time it appears(just for 1 second) and the page will get refreshed and popup disappears....pls help me...


<asp:TextBox id="date" onClick="javascript:return Calculate();" onfocus="Calculate(this);" AutoPostBack="false" runat="server" />
</td>
<td>

<asp:ImageButton ID="ImageButton1" ImageUrl="~/images/calendar_icon.png" OnClientClick="Calculate(); return false" runat="server" />