[SOLVED] Writing </script> from JavaScript = problem
Moderator: General Moderators
[SOLVED] Writing </script> from JavaScript = problem
Ok,
Here's the problem,
I need my JS to write on the page some text - some variable content,
and before it the TAG <script>
and behind it the TAG </script>
And to do it without stoping the current script.
All of you who had this problem, please reply.
Thanks Ahead !
Here's the problem,
I need my JS to write on the page some text - some variable content,
and before it the TAG <script>
and behind it the TAG </script>
And to do it without stoping the current script.
All of you who had this problem, please reply.
Thanks Ahead !
Last edited by Calimero on Tue Nov 16, 2004 2:06 pm, edited 1 time in total.
Js to make Js
I agree,
Using Js to make Js is pointless,
if you do this then it is no different from just writing js functions.
Rather use php to create the js script on the server,
which will execute in the client browser upon some event.
Make your life easy
Using Js to make Js is pointless,
if you do this then it is no different from just writing js functions.
Rather use php to create the js script on the server,
which will execute in the client browser upon some event.
Make your life easy
have u tried this idea...
viewtopic.php?t=26674
viewtopic.php?t=26674
...
Found the solution !!!
To check for your self insert a function inside, and test it.
text for myself (I knew this was possible
)
Hope this comes usefull sometimes.
See ya
Code: Select all
<?php
<script language="javascript">
var write_this = "<script" + "> .... anything - even complete JavaScript script </" + "script>";
// used only with document.write(), couldn't make it work with getElementById.
document.write(write_this);
</script>
?>text for myself (I knew this was possible
Hope this comes usefull sometimes.
See ya