Solved

script src=

Posted on 1999-01-15
2
192 Views
Last Modified: 2010-04-09
I decided long ago, based on something I read, that <script src= > cannot be used with Netscape 3.x (NS3).
But today I noticed that MS is using it succesfully on its site. When my own html says src=http:/www.microsoft... it does indeed work.
But if I copy the script (*x.js) to my web and try to use that with src=..., NS3 asks me if I want to save the script file.
What gives? I would love to pull out my scripts to separate files, since I use them from many pages.
CW
0
Comment
Question by:syccwe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
jhurst earned 100 total points
ID: 1841713
The
<script src=xxx.js>
</script>

tags need to specify xxx.js as being the path where the javascript is to be loaded from.  However, this is assumed to be relative to the path where the html loaded from.  So typically you need the script file and the html in the same place.    For example:

The html file:
<html>
<body>
<script src=test.js>
</script>
</body>

and the file test.js:
alert('This will pop up');

would cause the alert box to appear if these were both placed in the same directory on your server.

I placed these two files at:
http://www.REsource.nu/bugs/test.htm
and
http://www.REsource.nu/test.js
for your interest




0
 

Author Comment

by:syccwe
ID: 1841714
I did give the path. The problem seems to be, that for some reason, NS3 and my test web server(IIS3) don't match. On my production server, and your test page, I have an intermittent problem: NS doesn't execute the script but instead displays nothing from the loading page, but the *script source* instead! Other browsers are just fine!
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question