Skip to main content

Bug Tracker

Side navigation

#7466 closed bug (invalid)

Opened November 11, 2010 12:10AM UTC

Closed November 11, 2010 12:59AM UTC

Last modified March 15, 2012 12:43PM UTC

autoFill input doesn't work with Google Chrome

Reported by: remy.burney@powerfront.com Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

I use the JavaScript function below to have a default text on my input field, but it doesn't work with Google Chrome.

I just realize that I use the version 1.3.2, I didn't test the function with the latest version.

function autoFill(id, v){

	$(id).css({ color: "#b2adad" }).attr({ value: v }).focus(function(){

		if($(this).val()==v){

			$(this).val("").css({ color: "#333" });

		}

	}).blur(function(){

		if($(this).val()==""){

			$(this).css({ color: "#b2adad" }).val(v);

		}

	});

}

Attachments (0)
Change History (2)

Changed November 11, 2010 12:23AM UTC by anonymous comment:1

You can see and example at http://www.saba.com.au/www/600/1001127/1154322.asp

The input field is "Enter Suburb or Postcode" in that page.

Changed November 11, 2010 12:59AM UTC by snover comment:2

resolution: → invalid
status: newclosed

Thanks for the report, but 1.3.2 is over two years old. If you use the latest version of jQuery and this is still a problem and you can provide a reduction showing only the call that fails, please feel free to do so.

Also, you may want to learn about the html5 placeholder property.