By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,686 Members | 1,914 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,686 IT Pros & Developers. It's quick & easy.

Disabled input in IE

KeredDrahcir
100+
P: 426
I'm trying to create a form where I want two text input fields one on top of the other but to top input field wont work. When I hover over it, all I get it the mouse arrow rather than the text one.
This works fine in Firefox but not in IE. Is there any way to sort it out.
Expand|Select|Wrap|Line Numbers
  1. <div style="position: relative;">
  2.   <form name="subscription" method="post" location="">
  3.     <input id="updates" tyep="text" style="position: absolute; left: 760px; width: 160px; margin-top: -37px; color: #808080; z-index: 1;" disabled="disabled" value="Subscribe for Updates"/>
  4.     <input id="subscribe" name="email" type="email" style="position: absolute; left: 760px; width: 160px; margin-top: -37px; background-color: transparent; z-index: 99999;" onclick="document.getElementById('updates').value = '';"/>
  5.     <input name="submit" type="submit" value="Submit" style="position: absolute; left: 935px; margin-top: -39px;"/>
  6.   </form>
  7. </div>
I've tried commenting out the lower text field but this doesn't make any difference. I used to have this problem in IE but I haven't seen it for a long time.
Sep 13 '11 #1
Share this Question
Share on Google+
3 Replies


P: 26
<input type="email" is not supported by IE browsers. It should be type="text"
Sep 21 '11 #2

KeredDrahcir
100+
P: 426
I know that but if the browsers doesn't recongise the input type it defaults to text and setting as email helps iPhone users since it gives them the E-mail keyaod,
Sep 21 '11 #3

KeredDrahcir
100+
P: 426
The solutions is that IE doesn't like the box to have trasnparent text. I removed the back box, gave its style and value to the front box and used JavaScript to change the value when a user selected it.
Oct 6 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.