hi

it worked.. it seems some path problem was there

thanks for you help
--Deva

Moreno Herranz, Jose Luis wrote:

Hi Deva.
I think you must include both js files in your jsp

<script type ="text/JavaScript" src="main.js"></script>
<script type ="text/JavaScript" src="second.js"></script>

________________________________

De: Deva Pitchai(NatureSoft) [mailto:[EMAIL PROTECTED]
Enviado el: jue 20/04/2006 9:11
Para: Struts Users Mailing List
Asunto: [Inner Javascript issue]



hi all

anybody know how to call a js file in a js file like this....


main.js:
document.write("<script type='text/javascript' src='second.js'>
<\/script>");

second.js:
funciton alertMe() {
   alert("hi");
}


mainjsp.jsp:
<script type ="text/JavaScript" src="main.js"></script>
<script>
alertMe(); // should call the funciton whcih is in second.js
</script>


THis is not working. any idea of wht is the prob?

thanks in adv




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e


Reply via email to