473,583 Members | 3,386 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple <script type="text/javascript" src="mys.js"></script> OK?

joe
Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js" ></script>
<script type="text/javascript" src="funcs2.js" ></script>
<script type="text/javascript" src="funcs3.js" ></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css " rel="stylesheet " type="text/css" />
<link href="blah2.css " rel="stylesheet " type="text/css" />

Is that OK too?
Jun 27 '08 #1
3 7815
On Apr 15, 1:49 pm, joe <m...@invalid.c omwrote:
Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js" ></script>
<script type="text/javascript" src="funcs2.js" ></script>
<script type="text/javascript" src="funcs3.js" ></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css " rel="stylesheet " type="text/css" />
<link href="blah2.css " rel="stylesheet " type="text/css" />

Is that OK too?
That's fine.
Jun 27 '08 #2
On Apr 15, 1:49*pm, joe <m...@invalid.c omwrote:
Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js" ></script>
<script type="text/javascript" src="funcs2.js" ></script>
<script type="text/javascript" src="funcs3.js" ></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css " rel="stylesheet " type="text/css" />
<link href="blah2.css " rel="stylesheet " type="text/css" />

Is that OK too?
Sure. Just make sure that your multiple scripts don't share any
'global' variables, unless that's your intention.
Jun 27 '08 #3
On Tue, 15 Apr 2008 20:49:53 +0300, joe wrote:
Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js" ></script<script
type="text/javascript" src="funcs2.js" ></script<script
type="text/javascript" src="funcs3.js" ></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css " rel="stylesheet " type="text/css" /<link
href="blah2.css " rel="stylesheet " type="text/css" />

Is that OK too?
As others have said, thats fine.

There is a [small] performance hit for everything on the page that needs
to be downloaded. This includes all graphics, all style sheets, all
javascript files. If you ever run your document through one of those
speed-test programs, it may complain.

In reality, I don't worry about it... but I don't go overboard either.
Jun 27 '08 #4

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

Similar topics

2
10553
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script type="text/javascript"> <!]> </script> <script type="text/javascript"
6
4472
by: Saqib Ali | last post by:
I have created a slider using Javascript and html tables that generally works very well. As you move the "knob" to the right, a numeric value in an adjactent <INPUT type="text"> tag increases. As you move the knob to the left, the numeric value decreases... just as it should. It works very smooth and seamlessly. Very responsive to the...
9
13389
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript"> However, I have found that I can use an alternate file extension, such as <script src="foo.HTML" type="text/javascript"> It works fine with my...
10
3389
by: Blue® | last post by:
I would like to call the content of content.htm (containing only HTML codes) into index.htm. This is usually done by renaming index.htm to index.shtml and use this tag: <!--#include file="content.htm" --> But I do not want to use SSI. Is it possible to call it using something like:
23
16123
by: Loony | last post by:
I have got a code like this in HTML section in ASP file which includes javascript file! The script works under MS IE but doesn't with Firefox! Can anybody tell me what is wrong? <HTML> <HEAD><TITLE></TITLE> <SCRIPT LANGUAGE="JavaScript" SRC="../inc/JSfile.js"><SCRIPT> <SCRIPT> <!-- other javascript scripts working propely
3
1741
by: Oliver Saunders | last post by:
can someone please tell me why everytime i try and pass this to a js function i can't seem to use it for anything: <html> <head> <script language="javascript"> function a(fromlink) { alert(fromlink.nodeName); // outputs undefined alert(fromlink.nodeType); // outputs undefined alert(fromlink.parentNode); // outputs undefined
2
2950
by: yer darn tootin | last post by:
Here's the scenario: I have a javascript function taking the contents of a datalist ( content from a SQL db ) and opening it in a new window to allow the user to print. The pop-up window successfully applies the formatting from the datalist ( ie the dl's <ItemStyle> properties ), but ignores any of the formatting 'hard coded' into the SQL data...
22
130074
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the document and closes it with the following code: <body onload="window.print(); window.close();"> This works correctly (or at least the way I expect...
4
9162
by: Jon | last post by:
Hi, I used XslCompiledTransform with the following Xsl file. The <xsl:text disable-output-escaping="yes"does not work when using XslCompiledTransform to do the trnasform (namely the output contain < not <), while it works when using MSXML2 to do the transform. Does anyone have the same problem and how to make the escape work? Thanks. ...
0
7894
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8172
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8320
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7929
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8190
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6577
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
2328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1424
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1152
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.