I am using <script> inside the body tag.
<script type="text/javascript" language="javascript">
$('#audioVolume').text($('#audioVolume').text(Math.round((document.mediaPlayer.Volume + 2000) / 10) + "%"));
</script>
Error: Microsoft JScript runtime error: ‘undefined’ is null or not an object.
Need: I want to access the html elements in <script inside the body tag.
Best guess –
document.mediaPlayeris undefined. I think you’ve also got a typo – you’re setting the text of the element to the result of setting the text of the element? Try wrapping the whole thing inside a ready function so that it doesn’t run until the DOM is loaded. If that doesn’t work, then fire up the debugger tools in IE8 and see which element isn’t defined.