|
-
Dec 3rd, 2005, 10:18 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Javascript: Assign innerHTML to DIV
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:
<SCRIPT language="JavaScript">
function ProcessMediumSelection()
{
document.getElementById('divExpectedReturnDate2').innerHTML = '<script>DateInput(\\'ReturnDate\\', true, \\'DD-MON-YYYY\\')</script>';
}
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|