date [Resolved]

Posted by Sahaj.seema under ASP.NET on 2/19/2010 | Views : 1468 | Status : [Member] | Replies : 5
thnx for the code it's working but still i want a calendar control to be displayed on the lostfocus event of the textbox.would it nt possible, if not it is ok with ur previous code.thnx!!!!!!!!
regds,
seema.




Responses

Posted by: Abhi2434 on: 2/19/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down

Resolved
If you are using Asp.net calendar, then you cant see the calendar, until you forcefully postback the page to the server... Might be using AJAX or whatever.

Other than that, for any server side control, if it is made visible false, it is not rendered to the client, and no javascript can show it for you.

This is why, I always like Javascript Calendars.

www.abhisheksur.com

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Puneet20884 on: 2/21/2010 [Member] Bronze

Up
0
Down
use
txtBox.Attributes.Add("onBlur","document.getElementById('calanderId').style.display = 'inline'");

keep it's display = none by default
moreover you can give the display effect from some jQuery as well

Best Regards,
Puneet Sharma - Infosys
Pune, India

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/22/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
no need to use onBlur... B is not capital dude.

In fact it will work because Html is case insensitive. But why to use capital B...


www.abhisheksur.com

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Puneet20884 on: 2/22/2010 [Member] Bronze

Up
0
Down
I had not tried in the code and tested, i just wrote, thought to give an idea not the whole code,however the capital also works !!

<asp:TextBox onBlur="alert('a');" ID="TextBox1" MaxLength="100" runat="server"></asp:TextBox>


Best Regards,
Puneet Sharma - Infosys
Pune, India

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishithraj on: 2/24/2010 [Member] Bronze

Up
0
Down
What's the previous code. I think it would be better if you provided that too here.
You can try with onblur function of javascript to work with lost focus

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response