|
|
|
|
![]() ![]() |
May 21 2006, 04:15 AM
Post
#1
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
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:[code=HTML]<head> <script type="text/javascript" src="/foo/mainbar.js"></script> <script type="text/javascript" src="/foo/modulebar.js"></script> </head>[/code] Javascript code snippet:[code=Javascript]import Object.functionName; [/code] 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 |
|
|
|
Mar 16 2008, 10:36 AM
Post
#2
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
An alternate javascript import for web applications
Create And Import JavaScript Modules For A Large Script Why not try out owl import at http://code.Google.Com/p/owlimport/. An alternate way of import javascript and managing your javascript dependencies. -reply by mark forster |
|
|
|
May 14 2008, 11:30 AM
Post
#3
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th September 2008 - 04:46 AM |