Forum Moderators: open

Message Too Old, No Replies

Javascript & xhtml strict

Changing style no longer working

         

madmatt69

8:36 pm on Jul 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all,

I'm having a problem transitioning a page from xhtml transitional to xhtml strict.

Everything works in Strict except for a certain javascript function I have.

I've got a link that when clicked, changes the position of a div on the page:

onClick="document.getElementById('dates').style.left=242;document.getElementById('infoDiv').style.left=432;"

This works fine in xhtml Transitional, but not in Strict - I don't get any errors, it just doesn't do anything.

Any ideas here?

madmatt69

8:47 pm on Jul 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ha got it. Had to change it to style.left='432px' - i guess that's why it's xhtml strict ;)