473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Steve's LoadJsFile function...

URL: http://www.stekolla.com/articles/ondemand.php

can someone enlighten me as to how his approach solves dependencies ?

I have included:
try {
var t = new DependecyObject();
} catch (e) {
eval(LoadJSFile('dependencymodule.js', true));
}

i a few of my functions and i am not sure if above functions should be
placed in one file or in each individual files. Can someone please
enlighten me ?

Nov 12 '07 #1
1 1586
Rivotti said the following on 11/12/2007 6:14 PM:
URL: http://www.stekolla.com/articles/ondemand.php
Just when I thought I had seen the worst approach to trying to
dynamically load a JS File I see that one.
can someone enlighten me as to how his approach solves dependencies ?
It doesn't, all by itself.
I have included:
try {
var t = new DependecyObject();
} catch (e) {
eval(LoadJSFile('dependencymodule.js', true));
}
try, catch and eval all in one block. Ewwwww. Since LoadJSFile doesn't
return anything other than ''(possibly but not always), then I don't see
a lot of sense in eval'ing it. The file it is trying to load will get
executed.
i a few of my functions and i am not sure if above functions should be
placed in one file or in each individual files. Can someone please
enlighten me ?
Maybe you should try asking Steve about Steve's code.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Pierre Fortin | last post by:
Hi, Is the following a reasonable generic approach for converting python returned tuples/lists into dicts...? I'm not advocating library functions also return dicts (I'd probably spend more...
1
by: TC | last post by:
Hi Steve Some time ago I told you about the "blat" SMTP mailer. You said you would look into it. I'm now planning on using it myself. I've tried the DLL version, & am having a problem with the...
45
by: StopThisAdvertising | last post by:
Hi there, We all know Steve Santos. He *really* is an advertising and job-hunting machine. A lot of us have asked him *many* times and in different ways to stop his blatant advertising. This has...
3
by: vtashore | last post by:
I downloaded Steve Leban's RTF2 control and it works as advertised. Good news! After reading reference material on the RTF standard codes, I have been able to write update queries to universally...
26
by: arnuld | last post by:
this is the programme i created, for exercise 2, assignment 3 at http://www.eskimo.com/~scs/cclass/asgn.beg/PS2.html it runs fine. i wanted to know if it needs any improvement: ...
8
by: arnuld | last post by:
it is a very simple and it runs fine BUT still i want to have some views on this: -------------- PROGRAMME------------------------------ #include <stdio.h> int main() { int i;
4
by: arnuld | last post by:
again, i am looking for some good advice :-) -------------- PROGRAMME ---------------- /* Steve Summit's C programming assignment 3, exercise 5 STATEMENT:
9
by: user923005 | last post by:
/* ** Direct computation of Fibonacci numbers. ** ** Input: index of Fibonacci number to compute (n) ** ** Returns: nth Fibonacci number. */ #include <math.h> double ...
7
by: =?Utf-8?B?bWF0dCBw?= | last post by:
Steve Orr has a neat Captcha control: http://steveorr.net/articles/CAPTCHASP.aspx but aside from "dragging the control onto your toolbox.." Does anyone have any installation instructions: e.g....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.