473,385 Members | 1,615 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,385 software developers and data experts.

including js file within another js file

12
Hi

I have two .js files namely js1 and js.2. I want to include js1 file within js2 file. Is it possible. I tried with document.write("<script src="abc.js">.....</script>"). Let me have any solutions.

Gemguy
---------------------------
http://funmin.com/
http://withfriendship.com/
Jul 13 '07 #1
2 1389
acoder
16,027 Expert Mod 8TB
That wouldn't work, you need to escape the quotes.
Expand|Select|Wrap|Line Numbers
  1. document.write("<script src=\"blah.js\"><\/script>");
Jul 14 '07 #2
I had the same issue but all I did was included following statement right at the top of the js file where you want to include this file

<script type="text/javascript" src="abc.js"></script>

Make sure this statement is outside the script tag of this file.....
Aug 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Keiron Waites | last post by:
Hi, I include the following function: <?php function login($members_only) { if (isset($_COOKIE)) { $login = explode("|split|",$_COOKIE); $login =...
2
by: dennis.eklund | last post by:
Hi... I have a question that about global.asa and including a custom made class. Wonder if it's possible and if so, how? What I want is to set up my class global for the site, I made a asp...
4
by: Ralf Koms | last post by:
Hi, I would like to reference some other HTML files within an "main" HTML file (within the "header"), Something like this: <link rel="part1" href="file1.htm"> <link rel="part2"...
4
by: Rick | last post by:
I am fairly new to XML, I have an XML document that holds configurations for an ASP.NET application, within the configuration XML File I have a line of text that will feed into a lable on a web...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
5
by: Chris Ashley | last post by:
Hi there, I need to include an ASPX page within an ASP page. Is this possible? EG: making-a-claim.asp is: <!-- #include file="top.asp" -->
11
by: Gary Wessle | last post by:
Hi is it right to have a line like #include <path/to/header.hfor a library on my system, in my header file and use some functions provided by this library in the implementation file (file.cpp)...
7
by: Shelly | last post by:
Please tell me the best way to do this (I am still new to VB.NET and ASPX) as this should very easy for anyone with any experience to answer. In the code behind file (filename.aspx.vb), I import...
0
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. ...
1
by: vunet | last post by:
What's the possible disadvantage of including JavaScript files within a JavaScript file? Why I needed it? For the sake of easy management, perhaps? Any load speed disadvantage? Example below: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.