Vinit Patel

Archive for the ‘Javascript’ Category

Limited Selection from Listbox

Posted by: Vinit on: February 9, 2010

Hi, If I want to select only limited(2) items from the listbox then using Jquery use the below code, <head id=”Head1″ > <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js”></script> </head> <body> <form runat=”server”> <asp:ListBox ID=”ListBox1″ runat=”server” SelectionMode=”Multiple”> <asp:ListItem Text=”Item1″></asp:ListItem> <asp:ListItem Text=”Item2″></asp:ListItem> <asp:ListItem Text=”Item3″></asp:ListItem> <asp:ListItem Text=”Item4″></asp:ListItem> </asp:ListBox> </form> </body> <script type=”text/javascript”> $(‘#<%= ListBox1.ClientID %>’).change(function() { if ($(this).find(‘option:selected’).length > 2) { [...]

how to execute javascript function in code behind page

Posted by: Vinit on: September 25, 2009

There is two ways which i know, First := ClientScript.RegisterStartupScript(GetType(), ”ShowContinue”, ”ShowContinue();”, true); second := Public m_sScript As String = “” Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click m_sScript = “<script type=””text/javascript””>ShowContinue()</script>” End Sub and put <%=m_sScript%> at the end of the aspx page

Key Down Event For Textbox

Posted by: Vinit on: June 2, 2009

Basically we have the last Textbox for any web page. Then we dont want to move the cursor position to the button, this will work only with Internet Explorer… Last we have the cursor control in the password textbox. From there only if we want to Login to the next page . For Ex, Like [...]


Calendar

May 2012
M T W T F S S
« Jan    
 123456
78910111213
14151617181920
21222324252627
28293031  

Stats Of Blog

  • 2,408 hits

Cluster Map

Follow

Get every new post delivered to your Inbox.