473,398 Members | 2,368 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,398 software developers and data experts.

Javascript in IE6

Hi,
I'm developing a site for a department in my college. Their server has
no server-side scripting and thus I'm forced to use JS. As the
department have many pages with the same look-and-feel, I've decided
that I'll use HTML template to have the page look the same and JS to fix
the menu so that one wouldn't have to update all the pages if something
was deleted, added or modified. Anyways, FireFox takes it well, and so
does NS, but IE6 comlains that the page may modify data on the computer.
Anyways, this simple page creates the same problem:

<html>
<body>
<script language="javascript">
</script>
</body>
</html>

So, I figure that as long as IE(6) encounters a <script> tag, it starts
complaining (taking into account the security settings), which seems
rather dumb. So, I was wondering if there is a work-around.
Anyone? :)

Thanks,
Lüph
Jul 23 '05 #1
6 1280
Lüpher Cypher wrote:
I'm developing a site for a department in my college. Their server has
no server-side scripting and thus I'm forced to use JS. As the
department have many pages with the same look-and-feel, I've decided
that I'll use HTML template to have the page look the same and JS to fix
the menu so that one wouldn't have to update all the pages if something
was deleted, added or modified.


So that any user agent which can not or will not deal with JavaScript (like,
say, GoogleBot) will see no menu at all?

The best option for including content in multiple pages is some form of HTML
Preprocessor. This will do the same job as a server side script, but is run
on the development machine and outputs static documents which can be
uploaded to the webserver.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
>
So that any user agent which can not or will not deal with JavaScript (like,
say, GoogleBot) will see no menu at all?
Well, if I simply do the html template, and then 20 pages, imagine what
it's going to take to modify something general on the site. Also, see below.

The best option for including content in multiple pages is some form of HTML
Preprocessor. This will do the same job as a server side script, but is run
on the development machine and outputs static documents which can be
uploaded to the webserver.


The problem here also is that I'm simply developing the site (I'm a
work-study), and after I'm gone people, who are not exactly involved
with web programming, are going to maintain it. If I left them with html
code that needs to be modified every time something is going to be
changed, it would create more headache for them, then it is now - now
they can simply modify anything by adding/deleting/modifting a
definition of a function call in a separate JS file, and then using
dreamweaver to modify content. If it was me who would've been doing that
and I had a hosting account, I would've gone with server-side script :)
As for the preprocessors, I'm not so sure they would go with that - it
probably costs and they will have to train people to use it, whereas I
figure they already know how to use dreamweaver (I was told that's what
they will use). So.. The question remains.. :) Besides, from my point of
view, very small number of people don't have JS, and a some more have it
disabled, and rather much more have the browser prompt them :)
It just kind of pisses me off, because there are no statements that can
be hardful in the script, and IE should really look for those that can
be. I mean, if I change the .innerHTML property/etc that's not going to
do anything harmful. And - it does show the message even if it's an
*empty* script tag! ;<>

Lüph
Jul 23 '05 #3
Lüpher Cypher wrote:
[...]
disabled, and rather much more have the browser prompt them :)
It just kind of pisses me off, because there are no statements that can
be hardful in the script, and IE should really look for those that can
be. I mean, if I change the .innerHTML property/etc that's not going to
do anything harmful. And - it does show the message even if it's an
*empty* script tag! ;<>


MS in their wisdom allow access to far more platform capability
than JavaScript alone provides. I guess rather than just have
JSscript access to HTA or ActiveX objects complaining (i.e.
things that are Microsoft's invention and can do actual harm to
a PC), they decided to make IE complain about all scripts.

Simple solution: don't use IE. If users complain about their
browser complaining, tell them that it is an IE thing and that
they should use a different browser.
--
Fred
Jul 23 '05 #4
Lüpher Cypher wrote:
Anyways, this simple page creates the same problem:

<html>
<body>
<script language="javascript">
</script>
</body>
</html>

So, I figure that as long as IE(6) encounters a <script> tag, it starts
complaining (taking into account the security settings), which seems
rather dumb. So, I was wondering if there is a work-around.
Anyone? :)


I guess that you are loading the page from a file on your local disc. If
you load it from a webserver then IE6 will stop complaining.

If you want to suppress the warning, then add the line:
<!-- saved from url=(0013)about:internet -->
just after the <html> tag. This will cause the page to be loaded in the
internet security context instead of the more restricted local machine, but
it really is simpler just to run a local webserver and use that instead.
Jul 23 '05 #5
Lüpher Cypher wrote:

The problem here also is that I'm simply developing the site (I'm a
work-study), and after I'm gone people, who are not exactly involved
with web programming, are going to maintain it.
That usually calls for a fairly powerful content management system with very
strong limits on what users can write. (That or allowing them to produce
horrific markup).
If I left them with html
code that needs to be modified every time something is going to be
changed, it would create more headache for them, then it is now - now
they can simply modify anything by adding/deleting/modifting a
definition of a function call in a separate JS file
Changing a function call is simpler then editing a little bit of markup?
Well you could take the preprocessor a step futher and have it parse a
simple data format that describes the menu structure.

Although I think that:

<ul>
<li> <a href="item">item</a> </li>
<li> <a href="item">item</a> </li>
<li> <a href="item">item</a> </li>
<li> <a href="item">item</a>
<ul>
<li> <a href="item">subitem</a> </li>
<li> <a href="item">subitem</a> </li>
<li> <a href="item">subitem</a> </li>
</ul>
</li>

.... is pretty simple.
, and then using
dreamweaver to modify content. If it was me who would've been doing that
and I had a hosting account, I would've gone with server-side script :)
As for the preprocessors, I'm not so sure they would go with that - it
probably costs
That depends on the functionality you need from it. If you are just dumping
content into a template its trivial. I could write one in five minutes
using Free software (i.e. no prewritten libraries that you can't find on
the Internet for free). (Perl, File::Find, Template::Toolkit)
and they will have to train people to use it,
"Double click this icon after making changes to the website"
whereas I figure they already know how to use dreamweaver (I was told
that's what they will use).
Doesn't Dreamweaver do templating anyway?
So.. The question remains.. :) Besides, from my point of
view, very small number of people don't have JS, and a some more have it
disabled, and rather much more have the browser prompt them :)


About 15% according to some accounts. Rule 1 of JavaScript is to write
scripts that enhance an otherwise perfectly acceptable page.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #6
Fred Oz wrote:
Simple solution: don't use IE. If users complain about their browser
complaining, tell them that it is an IE thing and that they should
use a different browser.

Yes, it is the simple solution and - lets be honest - it is the solution
that the main security organisations are advising. But let's stick with
the real world for a moment and admit that eight out of ten people still
use it and are likely to carry on doing so, shall we?
Jul 23 '05 #7

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

Similar topics

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
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...

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.