IE9 support for placeholder text

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
BCooper
Posts: 19
Joined: Mon Jul 01, 2013 10:37 am

IE9 support for placeholder text

Post by BCooper »

Mmmm.. not sure where I should post this but if you use IE9 the placeholder property on inputs is not supported.

We have the instant response search box on the main page which can be confusing in IE9 (default browser) as it does not give the helpful 'Just type and find the answers ...' (see attached image).

To get around this I saved placeholders.min.js (http://jamesallardice.github.io/Placeholders.js/) to assets/js/ and in the index.tpl file I added an IE conditional comment to require the .js file if IE is 9 or less (I am not sure how IE 10 supports placeholders) as most other browsers support this property.

/assets/template/default/index.tpl line 171

Code: Select all

<!--[if lte IE 9]>
<script src="assets/js/Placeholders.min.js"></script>
<![endif]-->

</body>
</html>
Save and your good to go!
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: IE9 support for placeholder text

Post by Thorsten »

Hi,

thanks for the hint, IE10 supports the placeholder attribute: http://caniuse.com/#search=placeholder

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply