Hi,

As the title suggests, I'm trying to dynamically assign the innerHTML of a DIV tag, but I can't get it to work. I've escaped the characters correctly, but I only get garbage. Here's some code so that you can see what I'm talking about.
VB Code:
  1. <SCRIPT language="JavaScript">
  2. function ProcessMediumSelection()
  3. {
  4.     document.getElementById('divExpectedReturnDate2').innerHTML = '<script>DateInput(\\'ReturnDate\\', true, \\'DD-MON-YYYY\\')</script>';
  5. }

Is it getting mixed up by the <script> tag in the HTML I'm trying to assign? When the page is rendered, fragments of the code above is shown at the top. Anyone know how I can do this?