In my JSP i am using a custom tag <showDateFormat/>
like:
Date From:<showDateFormat/>
and in my common.js file i am having
function addDateFormatInfo(){
var dateFormatHolder = document.getElementsByTagName("showDateFormat");
if ( dateFormatHolder ){
for ( i = 0 ; i < dateFormatHolder.length; i++ ){
dateFormatHolder[i].innerHTML = '<div class="infoSmall" ><span>(mm/dd/yyyy)</span></div>';
}
}
}
so in my page wherever there is showDateFormat
tag is used, it will display (mm/dd/yyyy)
. It is working fine in FF, but not in IE. what could be the problem?
Please take a look about Custom Tags support in Internet Explorer.
http://msdn.microsoft.com/en-us/library/ms531076(VS.85).aspx
what you need a custom tag for IE, using Namespaces:
and instead of plain:
use
cutom tags are much more powerful especially when bound to HTC behaviors, but unfortunately they are still IE specific, although you can manage to code something using JQUERY for all browsers, read more here: Using custom tags in IE
You need to tell IE about the tag first. Add this line somewhere before calling
addDateFormatInfo()
:IE will now initialize the element correctly - you can treat it just like any other element. Firefox does this automatically.
Here's the source blog post:
http://ajaxian.com/archives/getting-html-5-styles-in-ie-7
Support for
createElement()
starts in IE7 - though I works fine in FF3.0.15Full Example