467,074 Members | 899 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,074 developers. It's quick & easy.

how to call external .js file from another .js file

hi,

usually if we call external js file by declaring them in our html page
head section:

<head>
..
..
..
<script language="JavaScript" src="j1.js"></script>
<script language="JavaScript" src="j1_ext.js"></script>
</head>

my question is...is it possible to declare j1_ext.js from j1.js?
eliminating j1_ext.js from <head ..section declaration.

<head>
..
..
..
<script language="JavaScript" src="j1.js"></script>
</head>

tnx

Sep 5 '07 #1
  • viewed: 4081
Share:
4 Replies
Randy Webb :
You forgot to mention that the type attribute is obsolete though.
I sure learn a lot here! Since when is that the case?

--
Johannes
"Quand on dit c'est un Johannes, cela vaut autant que ce que maintenant
on appelle un pédant" (H. Estienne, in É. Littré, /Dictionnaire de la
langue française/, art. PÉDANT)
Sep 5 '07 #2
Johannes Baagoe said the following on 9/5/2007 5:20 PM:
Randy Webb :
>You forgot to mention that the type attribute is obsolete though.

I sure learn a lot here! Since when is that the case?
I shouldn't have said the type attribute was obsolete, it isn't. What is
obsolete is the only acceptable value for the attribute. text/javascript
was obsoleted the minute it was standardized.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 5 '07 #3
Randy Webb wrote:
Johannes Baagoe said the following on 9/5/2007 5:20 PM:
>Randy Webb :
>>You forgot to mention that the type attribute is obsolete though.
I sure learn a lot here! Since when is that the case?

I shouldn't have said the type attribute was obsolete, it isn't. What
is obsolete is the only acceptable value for the attribute.
text/javascript was obsoleted the minute it was standardized.
Wrong. RFC4329, which you are you are referring to is *not* on the IETF
Standards Track. In fact, its status section explicitly states that "It
does not define an Internet standard of any kind."

That it was registered at IANA by initiative of the IESG/IETF as being
obsolete due to the presumption of the latter or the RFC's author (or him
not being clear enough on the subject, let alone not having demonstrated
sufficient experience in the field of application of the said media type
to date) has no bearing for (at least) my recommendation regarding that,
as using that so-called obsolete media type is the best current practice
due to the maximum possible support of it among current and possibly future
user agents. Much in contrast to the alternatives defined by that RFC.

The explanation for "obsolete" given to me by the RFC's author, Bjoern
Hoermann, in de.comp.lang.javascript was that according to RFC4288, the only
alternatives would have been "common" and "limited use", while the former
was strongly objected and the latter was seen as not being heavily endorsed
by the participants of the respective discussion.[1] Which IMHO would beg
the question whether any of those people has ever written a cross-browser
client-side script in an ECMAScript implementation.

http://pointedears.de/scripts/test/mime-types/
PointedEars
___________
[1] <b1********************************@hive.bjoern.ho ehrmann.de>
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Sep 6 '07 #4
ASM
En rponse Randy Webb qui crivit, en date du : 7/09/07 15:30, le
message suivant :
>
ASM has already posted the URL to
a page and the code to include a .js file on the fly. I know the code he
posted is dependable because I wrote it :)
Yes it is a copy-past :-)

It could be time you give your address and/or name on this page, no ?

(as it is in my bookmarks and I very often site it - without remembering
from where/who it comes )
Sep 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by keith | last post: by
1 post views Thread by Kelly Xie via .NET 247 | last post: by
6 posts views Thread by mygoogleaccount@gmx.de | last post: by
4 posts views Thread by dennise9@earthlink.net | last post: by
2 posts views Thread by kirkox | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.