tags:

views:

55

answers:

2

I'm trying to create a hidden textfield for an iphone specific site, basically I've taken a textfield, hidden all of its elements and show an image instead, when clicked this pops up an onscreen keyboard, as well as submitting when the form loses focus.

What I can't get rid of is the text caret. It flashes at me as if I'm some loser who can't set his VCR to anything but 12:00.

+2  A: 

Have you tried disabling the text field as well? disabled="disabled"

Tom Gullen
This makes the whole textfield unclickable now.Im using opacity:0; on the Textfield, with the image I want to show being the background for the containing div underneath.If I could change the color of the I-bar that would be fantastic as well... just need it out of my life.
Conor
A: 

Why not just change the type of the input element to "hidden" when it's not supposed to be edited? E.g.

<input type="hidden" name="datafield" id="datafield" />

That way it won't allow for the caret to be standing on it. If you need its value to be displayed, add a DIV and populate it with the datafield value. Then just put a click event on the DIV to activate the input field.

Gert G