onblur

jquery onblur not working

Hello $('#lPass').focus(function() { if (this.value == this.defaultValue) this.value = ''; $(this).after('<input type="password" id="lPass" size="10" value="'+this.value+'"/>').remove(); }).blur(function() { alert(1); }); <input id="lPass" type="text" size="10" value="Password"/> onBlur not working Any ideas? ...

onblur event not working with google chrome

I am trying to use onblur event to close a window. Its working fine in IE, Firefox and safari, but the event does not trigger in chrome. is that a bug in chrome or a mistake from me ...

Change input text to regular text on blur and ability to edit jQuery

I'm creating a form where I'm eliminating the use of a save button. The form is made up of input text boxes and textareas. After the user enters data into the input field, I want to trigger an onBlur function and change the input into a span that contains the information that the user entered. I also want to have the ability to edit thi...

onblur and onfocus attributes for textbox created progrmatically in vb.net

how do i put the onblur and onfocus attributes on a textbox created programatically? here's my code - td = New HtmlTableCell td.Style.Add("padding-bottom", "5px") Dim txtbox As New TextBox txtbox.Style.Add("width", "96%") txtbox.ID = "ename" td.Controls.Add(...

Jeditable Datepicker onblur problem

Hi, I am using inline editing using Jeditable and datepicker. I have a column in my table which displays Date as a hyperlink. When I click on this it shows me the datepicker. And when a particular date is selected its updated in the backend and the cell now is updated with the changed value. However, am having problem with onblur event...

clicking title bar fires onBlur in Opera

Hi, I am closing a popup window at 'onBlur' defined for 'BODY' of an ASP webpage, so when a user clicks outside the popup the popup closes. I want the popup to be moveable around the screen and it works for all browsers but Opera. In Opera the 'onBlur' event is fired when clicking the titlebar of the popup - this seems weird for me, a...

Using jQuery Autocomplete with Validator onBlur timing problem

Here's my problem, I have an input element in a form that is implementing jQuery.Autocomplete and jQuery.validate, all working normally except when I click an element in the autocomplete list to select it. What happens is validation occurs before the autocomplete sets its value. Because validation occurs on onBlur, and you just click...

ASP.NET :: Can a textbox control's onblur/lostFocus event trigger a server-side event?

I am trying to attach a server-side event to lookup the city/state for the user-entered zipcode in a field like the one below. <asp:TextBox ID="TextZipcode" runat="server" CssClass="inputtext" Columns="10" MaxLength="10"></asp:TextBox> Since there is no lost focus event to capture, has anyone had any luck getting this to work? ...

OnBlur and OnFocus event not working properly

Hi I'm trying to get my onblur and onfocus functions to work but they don't seem to be doing the right thing - i'm trying to say if the field "fullname" is empty then place "Full Name" in the field and if someone has entered something leave it as it is. At the moment it clears the field if it says "Full Name" and if its empty it puts "Fu...

button click event lost due to the alert box in text box onblur event

I have created a simple web form, containing one text box and one button. I have captured the onblur event of the text box. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script language="javascript" type="text/javascript"> function onTextBoxBlur() { a...

HTML input onfocus & onblur ?

ok, today I'm making a helper HTML function. It looks like this: function Input($name,$type,$lable,$value= null){ if (isset($value)) { //if (this.value=='search') this.value = '' echo '<label for="'. $name .'">'. $lable .'</label><input type="'.$type.'" name="'. $name .'" id="'. $name .'" value="'.$value.'" onfocus="if (this.v...

problem with onBlur event in IE

I have this HTML: <textarea class="question" onBlur="onBlurFun(event); return true;" name="aaa" id="bbb"></textarea> And this function in JavaScript onBlurFun = function(event) { var tgt = $(event.target); alert(tgt.attr('id')); } In IE, tgt is not properly set. What should I do to have access to calling node? ...

onBlur Javascript event with check if an element has focus

Hello I am trying to find a solution to a simple thing, that looks complex! I have a textarea where users can update their status. Underneath it I have a checkbox (ex: for the user to choose to tweet the status or no). What I try to do is this: 1/ When the textera get the focus, the textarea expands, for that it's fine. 2/ When the t...

Add element to change with existing onblur

I would like a separate DIV that's holding the input to also change in background color. How would I add it to my existing code that works? <script type="text/javascript"> jQuery(document).ready(function() { jQuery("input:[type=text]").focus(function () { jQuery(this).addClass("highLightInput"); }); jQuery("input:[type=text]").blur(f...

problem with onblur in IE and in FF

Hi, I have a code like this: (this is a pop-up) <body onblur="window.focus();"> <form id="ronny"> <select id="select1" name="select1"> <option> 1b </option> <option> 1a </option> </select> <select id="select2" name="select2"> <option> 2b </option> <option> 2a </option> </select> Now, my problems are: In FF - when i move to the ...

jquery: focus and blur on the password input field

Hi, I only want to set the code to alert one when I am out of 'focus' but the alert keeps piling up if I click on the input field and out of 'focus' more than one? http://nano-visions.net/dump2/focus/ $(document).ready(function(){ $(function() { $('#test-form-1 *[title]').inputHint(); }); $(".input-password").each(functio...

Keep the selection in a textarea

Hi guys :) Can I prevent the loss of selection in the "onblur" event ? <!DOCTYPE html> <html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en"> <head> <meta http-equiv = "Content-Type" content = "text/html; charset=utf-8"> <script type = "text/javascript"> window.onload = function () {...

javascript onblur onfocus

I have a page with embedded content where a user is tracked using AJAX GET requests. When they change tab/minimize window the window.onblur event stops the tracking, when they return window.onfocus starts the tracking again. This all works fine, until I introduce this embedded element (with a fullscreen option). So I have used a series ...