# Dtd limit jscript in msie

**URL:** <https://forum.kirupa.com/t/dtd-limit-jscript-in-msie/227081>\
**Category:** Uncategorized\
**Created:** [May 26, 2007, 6:57pm UTC](https://forum.kirupa.com/t/dtd-limit-jscript-in-msie/227081 "2007-05-26T18:57:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerokilled](https://avatars.discourse-cdn.com/v4/letter/z/ecae2f/32.png) [@zerokilled](https://forum.kirupa.com/u/zerokilled)\
**Post date:** [May 26, 2007, 6:57pm UTC](https://forum.kirupa.com/t/dtd-limit-jscript-in-msie/227081/1 "2007-05-26T18:57:52Z")

</div>

hi people,

apparently, specifiying the dtd to xhtml strict 1.0 in a web document, limit the capabilities of jscript for msie/win. at least in version 6 with sp2. I was developing a specific script for msie in response to the style position:fixed because msie/win doesn’t interpret this property:

```auto
if(document.all && window.attachEvent){ 
attachEvent('onscroll', function(){ 
	var style = document.getElementById('myTable').style; 
	style.position = 'absolute'; 
	style.top = document.body.scrollTop + 30 + 'px'; 
	}); 
} 

```

the only way the script can work is if i don’t specify the dtd declaration. but i would like the code to work with the dtd xhtml strict 1.0. anyone have any information concerning to jscript and the dtd in msie/win? any comment is welcome…

thanks.
