Forum Moderators: open

Message Too Old, No Replies

.js does not work in Internet Explorer?

Please help!

         

teamline

6:00 pm on Apr 17, 2005 (gmt 0)

10+ Year Member



Hi,

I have a Mambo site, css and .js file works fine in
Mozilla Firefox - but not in Explorer,


<link rel="stylesheet" type="text/css" href="<?php echo $mosConfig_live_site;?>/templates/21gsm/css/niftyCorners.css">
<link rel="stylesheet" type="text/css" href="<?php echo $mosConfig_live_site;?>/templates/21gsm/css/niftyPrint.css" media="print">
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/21gsm/nifty.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/21gsm/layout.js"></script>
<script language="JavaScript" type="text/javascript">

Any help please...

Thanks,

//Marina

Robin_reala

9:55 pm on Apr 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try putting a ; inside your script elements. e.g. <script>;</script>

BlobFisk

8:43 am on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, teamline!

When you say your js isn't working, do you mean that the file isn't being called correctly or that the functions in the file are not working?

teamline

10:41 am on Apr 18, 2005 (gmt 0)

10+ Year Member



Hi,

First of all - Robin, thank you for your help,
still it does not work with a ; ...

Next..
"do you mean that the file isn't being called correctly....

YES, it seems that the .js files isn't being called.

I have also tried to put the script code directly in my index file....

Here is layout.js:
window.onload=function(){
if(!NiftyCheck())
return;
Rounded("div#header","bottom","#D6DEEC","#84B7FF","smooth");
Rounded("div#header h1","bottom","#84B7FF","#657DA6","small smooth");
Rounded("div#content","tl bottom","#336600","#ccff00","smooth");
Rounded("div#nav","tr bottom","#D6DEEC","#95B3DE","smooth");
Rounded("div#sidenotes","all","#D6DEEC","#B1C0D5","smooth");
Rounded("form","all","#333333","#ccff00","smooth");
Rounded("blockquote","tr bl","#fff","#333333","border #333333");
Rounded("div#relax","all","#fff","#333333");
Rounded("div#footer","all","#D6DEEC","#CCCCCC","small border #fff");
Rounded("div#nifty","top","transparent","#FFC5FF","border #C0C0C0");
Rounded("div#nifty","bottom","transparent","#F0F0E7","small border #C0C0C0");
}

This cause me some head attac - (-: )-:

Span

11:09 am on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just a link that explains what this is about.
Nifty Corners: rounded corners without images [pro.html.it]

teamline

11:19 am on Apr 18, 2005 (gmt 0)

10+ Year Member




Hi Span,

Thatīs right,

I used the newest modification (5th April)

[pro.html.it...]

I implement it to my mambo, with tables and divs...

It works great in Mozilla, still not in Explorer, Avant browser...

It should work in them,

So I have something in my code.....?

I am a really css newbie.

//Marina

Span

12:19 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So I have something in my code.....?

Hi, just a guess.. if you use more than one window.onload event (and you have at least three..) there's a good chance you have a conflict.

Here is one: window.onload = iFrameHeight;
and there's one in the p2ff.js file.

So try taking out those scripts to see if that is the problem.

teamline

12:59 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



Here is one: window.onload = iFrameHeight;
and there's one in the p2ff.js file.

---------------------------------------------

I have only one window.onload , itīs
just layout.js

I will try to clean up my index file, since I have
a lot of table tr td...and attribute,

In worst case, if it doesnīt solve, I have to
make another css for IE user, I found a nice php
solution in this forum, ..if a IE visitor they comes to ex1.css templates and if else ex2.css ...
-and a button to download Firefox (-:

// Marina

teamline

8:14 pm on Apr 18, 2005 (gmt 0)

10+ Year Member




Hi,

(-:

At last - resolve the problems!
I post it here if anyone else get this problem,
------------------------------------------------------
1.
[Change all " to ']
<script type="text/javascript" ......
<script type='text/javascript' ......
------------------------------------------------------
2A.
In my layout.js - [ change all " to ' ]

window.onload=function(){
if(!NiftyCheck())
return;
Rounded('header','bottom','#D6DEEC','#84B7FF','smooth');
Rounded('header h1','bottom','#84B7FF','#657DA6','small smooth');
Rounded('content','tl bottom','#336600','#CCFF00','smooth');
Rounded('nav','tr bottom','#D6DEEC','#95B3DE','smooth');
Rounded('sidenotes','all','#D6DEEC','#B1C0D5','smooth');
Rounded('form','all','#333333','#ccff00','smooth');
Rounded('blockquote','tr bl','#fff','#333333','border #333333');
Rounded('relax','all','#fff','#333333');
Rounded('footer','all','#D6DEEC','#CCCCCC','small border #fff');
Rounded('nifty','top','transparent','#FFC5FF','border #C0C0C0');
Rounded('nifty','bottom','transparent','#F0F0E7','small border #C0C0C0');
}
------------------------------------------------------
2B
In layout.js

[ Delete all div#]

( see above layout.js and compare OLD posted in this topic)

Now it works great in both Mozilla and IE / Avant!

Still I have some positions problem in IE...

Thanks for all support!

//Marina