ASP.NET - javascript function not defined in firefox

Asked By msakt
10-Feb-12 07:08 AM
javascript function not defined in firefox..this error occure in firefox
  Somesh Yadav replied to msakt
10-Feb-12 07:23 AM
checklength.js
Code:
function guardMaxLength(ta,event)
{    
    maxlength=parseInt(ta.maxlength,10);
    if(ta.value.length>=maxlength)
    {    
       return false
    }
    ta.value=value;
}

HTML Code:
<script type="text\JavaScript" src="checkLength.js">

</script>
<textarea maxlength="10" onkeypress="return guardMaxLength(this, event)" >
  kalpana aparnathi replied to msakt
10-Feb-12 02:22 PM
hi,

use http://jquery.com/ for this. The click event exposed by jQuery is designed to be cross browser compatible and you'll likely find it works more consistently than what you're currently using.


Your method will then become:

 function ExecuteLink(linkID)
{
   $
("#" + linkID).click();
}
Create New Account
help
wrote something on a Word file and saved it as HTML, and took the source code and added it on the web-part. Suddenly, it isn't working and my entry a screen-shot: ( Error page high lighted in red ) Hi Zainab, You are getting a Javascript Error. Click on that yellow icon to get the details of error and share it wrote something on a Word file and saved it as HTML, and took the source code and added it on the web-part ." You have added HTML Source code to Web-part. Is it possible for you to remove this source code temporarily and verify if the problem goes away? (do ensure that you keep a backup of the HTML Source code before removing it) Additionally, try the View Source option in your browser and see whats there in Line 347. I feel something from your Word -> HTML Source code has gone inside the web-part which is causing this problem. By the way, how your Internet Explorer or making use of SharePoint Designer? I tried to remove the html code from the source, but I couldn't - - even if I save it, the text I
How to autorefresh a gridview In a ASP.NET page I want to refresh only a gridview in time interval of 30 secs instead Ajax update panel. Please check the following article for more details about the logic and code. http: / / asp-net-csharp-vb.blogspot.com / 2009 / 06 / auto-refresh-data-on-page-using-ajax.html Hope this helps. Could u plz send me the total code to help me out. . .???? Here is the code for you from the same article Public Sub BindData() con = New SqlConnection( "Initial Catalog = Northwind GridData.DataBind() End Sub You can check your current time on page load. Write this code: MyLabel.Text = System.DateTime.Now.ToString() BindData() and grid refresh time is: Protected Sub Timer1_Tick
JAVASCRIPT PROGRAM TO DISPLAY THE TEXT BOXES VALUES I am trying to text box values when an object, where dcode is a name of a text box. Iam putting the entire code. Please help me out. <html> <head> <title> Untitled Document< / title> <meta http-equiv = "Content-Type size = "5"> <strong> XYZ COMPANY LIMITED < / strong> < / font> < / u> < / p> <p> &nbsp;< / p> <p> Employee code :&nbsp;&nbsp;&nbsp;&nbsp; <input type = "text" name = "ecode" onKeyPress = "checknumber()"> < / p> <p> Employee name :&nbsp; &nbsp;&nbsp; <input type = "text" name = "ename" onKeyPress = "checktext()"> < / p> <p> Department code : &nbsp; <input type = "text" name = "dcode" onKeyPress = "checknumber()"> < / p> <p> Department name : &nbsp; <input type nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name = "gsal" type = "text" size = "3" maxlength = "8" onKeyPress = "checknumber()"> < / p> <p> Net salary :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type = "text" name = "netsal" size = "10" maxlength = "8" onKeyPress = "checknumber()"> < / p> <p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp id = "Reset" value = "Reset"> < / p> <p> &nbsp; < / p> < / form> <p> &nbsp;< / p> <script type = "text / javascript"> function checknumber() { if(window.event.keyCode> = 48 && window.event.keyCode< = 57) return true; else alert ("Invalid
ASP Net works on IIS5 but not in IIS6 using IE I just setup a new server std ed. It is running .net framework 1.1 with sp1. I have a simple asp.net page. When I depress a submit button nothing happens. Here's the funny part. If I use Netscape the page works as well as using FireFox. It just won't work using any version in IE. HELP!!!!!!!!!!!!!!! on the page in visit, and the don't work for this app, chances are you got some baaaad code in there in the ASP.NET page. This page is currently working under win 2000 IIS 5. I migrated the website
Mask edit using jquery Mask edit using jquery and javascript hi refer this example • < input id = "MaskTextBox" type = "text" / > $( function () { / / Input Masks: / / Telephone : (000) 000-0000 / / Telephone w / Exension : (000) 000-0000 Ext. 99999 / / Social Security : 000-00-0000 / / Zip Code : 00000 / / US State Code : > LL $( "#MaskTextBox" ).igMaskEditor( { nullText : "Enter Phone Number. . ." , inputMask: "(000) 000-0000" , width : 150 } ); }); follow http the keypress event, make sure to handle the paste event if needed. MaskedEdit is an ASP.NET AJAX extender that attaches to a TextBox control to restrict the kind of text that be the same as the page: English (United States). Video - How Do I: Use the ASP.NET AJAX MaskedEdit Control? example- http: / / www.asp.net / ajaxlibrary / HOW%20TO%20Use%20the%20MaskedEdit%20Control.ashx refer this example < p