Jump to content

[SOLVED] Content Replacement .innerHTML =


947740

Recommended Posts

This code worked at one point, and now it does not:

 

<script language='javascript' type='text/javascript'>
window.start = 4;

function addText() {
window.start++;
var area = document.getElementById("more_fields");
area.innerHTML += "Date: <select name='time[" + window.start + "]'><option value='1225692000' >11/3/2008
<option value='1225778400' >11/4/2008
<option value='1225864800' >11/5/2008
<option value='1225951200' >11/6/2008
<option value='1226037600' >11/7/2008
<option value='1226124000' >11/8/2008
<option value='1226210400' >11/9/2008
<option value='1226296800' selected>11/10/2008
<option value='1226383200' >11/11/2008
<option value='1226469600' >11/12/2008
<option value='1226556000' >11/13/2008
</select> Delete: <input type='checkbox' name='delete[" + window.start + "]' value='delete' /><textarea name='" + start + "' rows='4' class='textarea'></textarea><br /><br />";

}
</script>

 

There is a div element called "more_fields" in the html.

 

Help would be appreciated.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.