MichaelDPrice
Programmer
Hey Guys 
I have been trying to get this done for hours, and am becoming extremely frustrated!!!!
I am trying to do some Javascript on Demand.
What I am trying to do is get the contents of an html page and turn it into a javascript variable.
I am doing this by dynamically creating a script tag with a cross domain php file which gets the file contents of an html file and then echo'ing the contents into a javascript variable.
Problem is the html is breaking lines and I keep getting the "unterminated string error ...
Does anyone know How I can get this done.
I have tried everyting. I even exploded the html page by singe characters, making the output look like this ...
html = html+'<';
html = html+'d';
html = html+'i';
html = html+'v';
html = html+' ';
html = html+'<';
html = html+'b';
html = html+'r';
html = html+' ';
html = html+'/';
html = html+'>';
html = html+'';
but after the <div />
the nest line will output
html = html+'
';
Then I changed the header to xml
<xmldata>
<thehtml>
.....
......
</xmldata>
But got denied permissions ...
What can I do to access this html pages content, cross domain, via javascript?
I have been trying to get this done for hours, and am becoming extremely frustrated!!!!
I am trying to do some Javascript on Demand.
What I am trying to do is get the contents of an html page and turn it into a javascript variable.
I am doing this by dynamically creating a script tag with a cross domain php file which gets the file contents of an html file and then echo'ing the contents into a javascript variable.
Problem is the html is breaking lines and I keep getting the "unterminated string error ...
Does anyone know How I can get this done.
I have tried everyting. I even exploded the html page by singe characters, making the output look like this ...
html = html+'<';
html = html+'d';
html = html+'i';
html = html+'v';
html = html+' ';
html = html+'<';
html = html+'b';
html = html+'r';
html = html+' ';
html = html+'/';
html = html+'>';
html = html+'';
but after the <div />
the nest line will output
html = html+'
';
Then I changed the header to xml
<xmldata>
<thehtml>
.....
......
</xmldata>
But got denied permissions ...
What can I do to access this html pages content, cross domain, via javascript?