O
ojvm
Hi every body. as my post says, i want to add javascript to my page on
the fly. for example
page1.html
<html>
<head>
<script type='text/javascript'src='controlador.js'></script>
<title>...</title>
</head>
<body>
......
</body>
</html>
now when the page has been loaded, acording some user's actions, i'd
like to add a new script, like this.
page1.html
<html>
<head>
<script type='text/javascript'src='controlador.js'></script>
<script type='text/javascript'src='new-file-just-added.js'></script>
<title>...</title>
</head>
<body>
......
</body>
</html>
right now i'm doing this.
document.write("<script type='text/javascript'src='new-file-just-
added.js''></script>");
obviusly this is not working properly, because, i think, in that way
all the content is erased.
hope you can helpme. thanks
the fly. for example
page1.html
<html>
<head>
<script type='text/javascript'src='controlador.js'></script>
<title>...</title>
</head>
<body>
......
</body>
</html>
now when the page has been loaded, acording some user's actions, i'd
like to add a new script, like this.
page1.html
<html>
<head>
<script type='text/javascript'src='controlador.js'></script>
<script type='text/javascript'src='new-file-just-added.js'></script>
<title>...</title>
</head>
<body>
......
</body>
</html>
right now i'm doing this.
document.write("<script type='text/javascript'src='new-file-just-
added.js''></script>");
obviusly this is not working properly, because, i think, in that way
all the content is erased.
hope you can helpme. thanks