Javascript in IE6

L

Lüpher Cypher

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
 
D

David Dorward

Lüpher Cypher said:
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.
 
L

Lüpher Cypher

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
 
F

Fred Oz

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.
 
D

David Dorward

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.
 
M

Mark Preston

Fred said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top