Browsers Insert html in my code  
Author Message
Spangltk





PostPosted: Visual FoxPro General, Browsers Insert html in my code Top

I'm useing foxpro to create content for my webpages, I insert html code into a memo field. then a web page will grab the data. I like to use ascii characters to keep my code tidy so I can read it when its a web page. My problem is that the browser reads the ascii text and inserts <BR> messing up my javascript. What can I do
i.e.
Javascript = "function AlertMe() { ";
+chr(13)+chr(10)+" Alert(' Alert! ');";
+chr(13)+chr(10)+" } "


after browsers:
function AlertMe(){<BR>
Alert(' Alert! ');<BR>
}<BR>



Visual FoxPro1  
 
 
Spangltk





PostPosted: Visual FoxPro General, Browsers Insert html in my code Top

RESOLVED!
chr(13) will place a <br> in the script. chr(10) is suffecient enough to move the code to the next line and help readability