problem with inserting a table into a table
my intent was to insert a table into a table. I thought it was going to be straight forward code. as it turns out there are some land mines.
first i wrote the HTML opening
print(’ txt test ');
followed by the main table
$f1 = <<< MF
inserted table |
next was a javascript set variable statement using the getElementById statement.
here is what i found:
a- setting to a simple text worked ok (it changed the contents on the screen)
b- as did some simple HTML (
) added
c- as did a variable loaded with a table statement that contained NO line breaks
d- provided I changed the quote to double-quote
e- if i added 1 line break it failed
f- my intention was to take a simple table statement (like one that would be produced by MS word or some open equivalent ) and insert it via a named element.
all the code is at the bottom of this letter - nothing is out of the ordinary PHP so i can’t blame some function not documented.
what did i do wrong?
Paul Alagna
[php]<?php
// file txt test
//
print(’ txt test ');
$f1 = <<< MF
inserted table |
inserted inserted table |
inserted table table |
inserted table table |
george'; // works // document.getElementById('td1').innerHTML = "$f3"; // works // document.getElementById('td1').innerHTML = '$f3'; //no // document.getElementById('td1').innerHTML = '$f3'; //no // document.getElementById('td1').innerHTML = "$f3a"; // no // document.getElementById('td1').innerHTML = '$f2'; // no // document.getElementById('td1').innerHTML = "$f2" // no
$tt = <<< GG
GG
;
print($tt);
print(’’);
?>
[/php]