Firstly, avoid document.write(ln). It's old, old, old. Create an HTML element (span or div or something), give it an ID, and use innerHTML (or jQuery .html()) to populate it after it's created.
Secondly, the // at the beginning of the line is commenting out that line. Remove that, and the line should be enabled. But, again, refer to my "Firstly" comment.
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
Firstly, avoid document.write(ln). It's old, old, old. Create an HTML element (span or div or something), give it an ID, and use innerHTML (or jQuery .html()) to populate it after it's created.
Secondly, the // at the beginning of the line is commenting out that line. Remove that, and the line should be enabled. But, again, refer to my "Firstly" comment.
I know that it's a old way to do it.
But, I want to execute that Javascript remotely through my browser, without removing comment lines. Is that possible?
If the double-slash is preceeding it, no. It's commented out, the browser does not parse it.
If you need to set it so that it triggers on a button click or link click, place that inside a function and call the function using onclick="" attribute. But, then, that brings us back to the "Firstly" comment. document.write and document.writeln both will rewrite the whole page if executed after the page loads.
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
Last edited by WolfShade; 03-08-2013 at 03:10 PM..