js file inclusion problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rushmin_Fernando
Posted On:   Thursday, May 15, 2008 11:38 PM

In a HTML page I use a script tag with external JavaScript source. But to fulfill a need in the aforementioned lib.js file I need to call a function which is in lib2.js. But I do not need to include that lib2.js file in my HTML file. Let’s say in my lib2.js file there is a function called test(). So what I need to do is call that function in lib.js file. So I used the following coding in lib.js file document.write(" "); document.write(" "); This code works perfectly in Firefox. But in IE it fails. When I use IE it can't resolve the funct   More>>

In a HTML page I use a script tag with external JavaScript source.





But to fulfill a need in the aforementioned lib.js file
I need to call a function which is in lib2.js.
But I do not need to include that lib2.js file in my HTML file.


Let’s say in my lib2.js file there is a function called test(). So what I need to do is call that function in lib.js file.


So I used the following coding in lib.js file


document.write(" ");


document.write(" ");



This code works perfectly in Firefox. But in IE it fails.
When I use IE it can't resolve the function name.


So can anyone please give me a solution for this ?

Note: these are not the actual codes that I’m writing
But the mechanism is exactly as same as the example that I mentioned before

   <<Less

Re: js file inclusion problem

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, May 22, 2008 12:09 PM

try to use DOM to insert your script into the page viewed by the user.
About | Sitemap | Contact