How To set Default Button for ENTER key pressed event(3 way)
1. <form id="form1" runat="server" defaultbutton="Button1" defaultfocus="TextBox1">
2. <asp:Panel ID="Panel1" runat="server" DefaultButton="Button1">
3.Using Javascript :
var __defaultFired = false;
function WebForm_FireDefaultButton(event, target) {
var element = event.target || event.srcElement;
if (!__defaultFired && event.keyCode == 13 && !(element && (element.tagName.toLowerCase() == "textarea"))) {
var defaultButton;
if (__nonMSDOMBrowser)
defaultButton = document.getElementById(target);
else
defaultButton = document.all[target];
if (defaultButton) {
if(typeof(defaultButton.click) != "undefined")
defaultButton.click();
else
eval(unescape(defaultButton.href.replace("javascript:", "")));
event.cancelBubble = true;
if (event.stopPropagation) event.stopPropagation();
return false;
}
}
return true;
}
PHP User Authentication by IP Address
ReplyDeletePrint specific section of a web page
Simple File Upload Script in PHP
HTML5 Geolocation API Visitor Location
jQuery File upload progress bar
Google Street View API Example
How to generate QR Code in PHP