Hey guys,
I have posted this somewhere else to no avail, maybe you guys can help me out.
I converted the whole thing to php, and it looks better when looking at the source code, but it still doesn’t work. Does anyone see anything wrong with the code here:
Here’s the php that produces the string:
[CODE]<?php
echo ‘var inner = ‘<colgroup><col span=”1″ width=”250″ /><col span=”1″ width=”
200″ /></colgroup><tr><td class=”leftAlign”>Letter of Recommendation</td><td>’;
if(mysql_num_rows($f) != 0) {
echo ‘<select name=”recommendation_archive”>’;
include “includes/objects/files_drpDwn.php”;
echo “</select>”;
}
else {
echo “No files in archives.”;
}
echo ‘</td><td><input name=”recommendation_upload” type=”file” /></td></tr>’;
if(mysql_num_rows($f) != 0) {
mysql_data_seek($f, 0);
} // allow for repeat of query
echo ‘<tr><td class=”leftAlign”>Letter of Recommendation</td><td>’;
if(mysql_num_rows($f) != 0) {
echo “<select name=”recommendation_archive2″>”;
include “includes/objects/files_drpDwn.php”;
echo “</select>”;
}
else {
echo “No files in archives.”;
}
echo ‘</td><td><input name=”recommendation_upload2″ type=”file” /></td></tr>’;
if(mysql_num_rows($f) != 0) {
mysql_data_seek($f, 0);
}// allow for repeat of query
echo ‘<tr><td class=”leftAlign”>Acceptance Letter</td><td>’;
if(mysql_num_rows($f) != 0) {
echo “<select name=”acceptance_archive”>”;
include “includes/objects/files_drpDwn.php”;
echo “</select>”;}
else {
echo “No files in archives.”;
}
echo ‘</td><td><input name=”acceptance_upload” type=”file” /></td></tr>’;’;
?>
Here’s the output:
[code]var inner = ‘<colgroup><col span=”1″ width=”250″ /><col span=”1″ width=”200″ /></colgroup><tr><td class=”leftAlign”>Letter of Recommendation</td><td><select name=”recommendation_archive”><option value=”Choose…”>Choose…</option><option value=”8u-03262010-u7p”>transcript_uploadyv4vg</option> <option value=”nf-03262010-lsk”>resume_uploadrogpa</option> </select></td><td><input name=”recommendation_upload” type=”file” /></td></tr><tr><td class=”leftAlign”>Letter of Recommendation</td><td><select name=”recommendation_archive2″><option value=”Choose…”>Choose…</option><option value=”8u-03262010-u7p”>transcript_uploadyv4vg</option> <option value=”nf-03262010-lsk”>resume_uploadrogpa</option> </select></td><td><input name=”recommendation_upload2″ type=”file” /></td></tr><tr><td class=”leftAlign”>Acceptance Letter</td><td><select name=”acceptance_archive”><option value=”Choose…”>Choose…</option><option value=”8u-03262010-u7p”>transcript_uploadyv4vg</option> <option value=”nf-03262010-lsk”>resume_uploadrogpa</option> </select></td><td><input name=”acceptance_upload” type=”file” /></td></tr>’;
And here is the complete function in case I am missing something:
[code]
if(value == 1) {
var continueEssay = document.getElementById(‘essayExplanation’);
var newdiv = document.createElement(‘table’);
var continueInfo = document.getElementById(‘continuing’);
var divClassName = ‘filesTable’;
newdiv.setAttribute(‘class’,divClassName);
var divIdName = ‘files’;
newdiv.setAttribute(‘id’,divIdName);
<?php
echo ‘var inner = ‘<colgroup><col span=”1″ width=”250″ /><col span
=”1″ width=”200″ /></colgroup><tr><td class=”leftAlign”>Letter of Recommendatio
n</td><td>’;
if(mysql_num_rows($f) != 0) {
echo ‘<select name=”recommendation_archive”>’;
include “includes/objects/files_drpDwn.php”;
echo “</select>”;
}
else {
echo “No files in archives.”;
}
echo ‘</td><td><input name=”recommendation_upload” type=”file” /></td></tr>
‘;
if(mysql_num_rows($f) != 0) {
mysql_data_seek($f, 0);
} // allow for repeat of query
echo ‘<tr><td class=”leftAlign”>Letter of Recommendation</td><td>’;
if(mysql_num_rows($f) != 0) {
echo “<select name=”recommendation_archive2″>”;
include “includes/objects/files_drpDwn.php”;
echo “</select>”;
}
else {
echo “No files in archives.”;
}
echo ‘</td><td><input name=”recommendation_upload2″ type=”file” /></td></tr
>‘;
if(mysql_num_rows($f) != 0) {
mysql_data_seek($f, 0);
}// allow for repeat of query
echo ‘<tr><td class=”leftAlign”>Acceptance Letter</td><td>’;
if(mysql_num_rows($f) != 0) {
echo “<select name=”acceptance_archive”>”;
include “includes/objects/files_drpDwn.php”;
echo “</select>”;}
else {
echo “No files in archives.”;
}
echo ‘</td><td><input name=”acceptance_upload” type=”file” /></td></tr>’;’
;
?>
newdiv.innerHTML = inner;
ni.appendChild(newdiv);
continueEssay.removeChild(continueInfo);
}
Basically the only errors occur when trying to attach this string in IE. I can’t see an error in the string itself or the php, but let me know if you guys see an issue with the output. Thanks.
—
Greg