vizskywalker 0 Report post Posted May 21, 2006 I have one main script which defines an object. I then have several other script files that define functions for that object. I have tried using the following setup to import the functions:HTML code snippet: <head><script type="text/javascript" src="/foo/mainbar.js"></script><script type="text/javascript" src="/foo/modulebar.js"></script></head>Javascript code snippet:import Object.functionName;This works fine for Mozilla Firefox, but causes an error in Internet Explorer which causes the object to be undefined. I would like to know how better to import the functions into the main javascript (preferably without needing to add the module script to the html file) that works in both Firefox and Internet Explorer.Thank you,~Viz Share this post Link to post Share on other sites
iGuest 3 Report post Posted March 16, 2008 An alternate javascript import for web applications Create And Import JavaScript Modules For A Large Script Why not try out owl import at http://forums.xisto.com/no_longer_exists/. An alternate way of import javascript and managing your javascript dependencies. -reply by mark forster Share this post Link to post Share on other sites
iGuest 3 Report post Posted May 14, 2008 how to import javascript ? Create And Import JavaScript Modules For A Large Script I have created login page (login.Htm) containing username textbox and password textbox.I want to validate username nad password but, also don't want to write script in same (login.Htm) file. I have written script for validation in another validate.Js file and called it in login.Htm but it's not working. Can anybody help me out? -question by rahul patil Share this post Link to post Share on other sites