Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying a "clear button" (delete button) in an iPhone webapp textbox

I am creating an iPhone webapp with a textbox. I would like that textbox to display a "clear button" on the right side of the box... aka the round grey button with the X in it.

Is it possible to set a css or html property so safari handles this, or do i need to develop this ability on my own using an image and some code.

I know you can set the Clear Button property of a UITextBox for a native app, but this is a webapp i am creating.

like image 778
AlBeebe Avatar asked Sep 13 '09 13:09

AlBeebe


1 Answers

An input field of type "search" will bring up a rounded text box with a clear button marked "X". That is the closest I have found without using javascript.

<input xmlns="http://www.w3.org/1999/xhtml" type="search" value="search me" />
like image 119
Peter DeWeese Avatar answered Oct 02 '22 04:10

Peter DeWeese