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
https://forums.phpfreaks.com/topic/132159-solved-content-replacement-innerhtml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.