PageSourceSearch

https://www.949vans.com/scripts/defaultButtons.js

js 949vans.com collected 2026-10-09 03:59:34 UTC 1,340 bytes, 38 lines download raw bytes

1/* DefaultButtons/Validators/FireFox Textarea Fix */
2/*
3  This function is used to override the default ASP.NET FireDefaultButton function to 
4  fix non-IE issues with the script.  
5  
6  This override will fix:
7    - FireFox issue where the form submits when en a textarea and enter is clicked 
8      the default function from MS uses "srcElement" to locate the source control
9      this does not work in non-IE browsers
10    
11  To use: 
12    - include this script on the page after the embedded javascript file generated 
13      by ASP.NET to override the default action.
14*/
15
16/* fixed to allow newlines in textareas with FireFox */
17function WebForm_FireDefaultButton(event, target) {
18  var isTextarea = false;
19  var defaultButton;
20    
21  if (__nonMSDOMBrowser) {
22	defaultButton = document.getElementById(target);
23	if (event.target.tagName.toLowerCase() == "textarea") { isTextarea = true; }
24  } else {
25	defaultButton = document.all[target];
26	if (event.srcElement.tagName.toLowerCase() == "textarea") { isTextarea = true; }
27  }		
28	
29  if (event.keyCode == 13 && !isTextarea) {
30	if (defaultButton && typeof(defaultButton.click) != "undefined") {	  
31	  defaultButton.click();
32	  event.cancelBubble = true;	  
33	  if (event.stopPropagation) event.stopPropagation();
34	  return false;
35	}
36  }
37  return true;
38}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.