Click to See Complete Forum and Search --> : help with MS vs NS (plz help)


ukemike
08-12-2003, 10:32 AM
I have been trying to make this one page of my website compatible with netscape 7.0 for so long. i give up. if anyone have a couple of minutes i would really appreciate it if they looked at my source. it works perfectly in MSIE 6.0 but doesnt do anything in netscape. i tried to debug it with alert statements, but for some reason. where i have this_key.height = 0
this_key.visibility = hidden;
it wont execute those two statements in netscape. i know my code is kinda buggy, its my first attempt at making something like this so plz bare wid me.

i've broke it up into two pieces cuz it woudlbt let me post the whole thing. thanx


Anyway here it is:

<HTML>
<HEAD>



<script language="JavaScript" src="java.js"></script>





<STYLE>


a:active, a:link {text-decoration: none; color: 'red';}
a:hover {color: "white"; text-decoration: none;}
a:visited {text-decoration: none;}


</STYLE>

<SCRIPT LANGUAGE="JavaScript">

<!-- hide from old browsers

//var init_msg = "THIS IS DA FUTURE. YOU ARE WELCOMED TO JOIN. F*CK DA NONBELIEVERS, F*CK DA FEDS. HARDKORE LIVEZ. prince of darknezz "
var str = ""
var msg = ""
var leftmsg = ""


function setMessage()
{
if (msg == "")
{
str = " "
msg = init_msg
leftmsg = ""
}

if (str.length == 1)
{

while (msg.substring(0, 1) == " ")
{
leftmsg = leftmsg + str
str = msg.substring(0, 1)
msg = msg.substring(1, msg.length)
}
leftmsg = leftmsg + str
str = msg.substring(0, 1)
msg = msg.substring(1, msg.length)
for (var ii = 0; ii < 120; ii++)
{str = " " + str}
}
else
{
str = str.substring(10, str.length) // decrease str little by little
}


window.status = leftmsg + str
JSCTimeOutID = window.setTimeout('setMessage()',5)
}

<!-- done hiding -->

</SCRIPT>



<style>
<!--

#intro {position: absolute;

left: 50px;
top: 24px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0px;

}


#news {position: absolute;

left: 50px;
top: 52px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0px;
}

#discussion {position: absolute;

left: 50px;
top: 84px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}

#events {position: absolute;

left: 50px;
top: 116px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}


#tutorials {position: absolute;

left: 50px;
top: 148px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}


#production {position: absolute;

left: 50px;
top: 180px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}


#pictures {position: absolute;

left: 50px;
top: 212px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}


#**** {position: absolute;

left: 50px;
top: 244px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}


#links {position: absolute;

left: 50px;
top: 276px;
width: 100px;
height: 0px;
background-color: black;
layer-background-color: black;
visibility: hidden;
border: 2px solid red;
padding: 0 px;
}


see next post
-->


</style>

ukemike
08-12-2003, 10:33 AM
<script language="JavaScript">
function my_script(key_id)
{

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;


if (ie4up)
{
//alert('microsoft');


var this_key = document.all(key_id).style;

document.all('intro').style.visibility = 'hidden';
document.all('news').style.visiblity = 'hidden';
document.all('discussion').style.visibility = 'hidden';
document.all('events').style.visibility = 'hidden';
document.all('tutorials').style.visibility = 'hidden';
document.all('production').style.visibility = 'hidden';
document.all('pictures').style.visibility = 'hidden';
document.all('****').style.visibility = 'hidden';
document.all('links').style.visibility = 'hidden';
visible = 'visible';
}

else if (ns6up) //(document.layers)=netscape
{


var this_key = document.getElementById[key_id].style;


document.getElementById['intro'].style.visibility = 'hide';
document.getElementById['news'].style.visibility = 'hide';
document.getElementById['discussion'].style.evisibility = 'hide';
document.getElementById['events'].style.visibility = 'hide';
document.getElementById['tutorials'].style.visibility = 'hide';
document.getElementById['production'].style.visibility = 'hide';
document.getElementById['pictures'].style.visibility = 'hide';
document.getElementById['****'].style.visibility = 'hide';
document.getElementById['links'].style.visibility = 'hide';
visible = 'show';
alert('o');
}


// alert("o");

//first clear everything



this_key.height = 0;
this_key.visibility = visible;


if (key_id=='news') doTimer_news(this_key);
if (key_id=='intro') doTimer_intro(this_key);
if (key_id=='discussion') doTimer_discussion(this_key);
if (key_id=='events') doTimer_events(this_key);
if (key_id=='tutorials') doTimer_tutorials(this_key);
if (key_id=='production') doTimer_production(this_key);
if (key_id=='pictures') doTimer_pictures(this_key);
if (key_id=='****') doTimer_****(this_key);
if (key_id=='links') doTimer_links(this_key);
return true;

}


function timer_close(timeout_, id) {

//x = clearTimeout(timeout_);


if (document.all)
{
var this_key = document.all(key_id).style;
hidden = 'hidden';

} else if (document.layers) {
var this_key = document.layer[key_id];
hidden = 'hide';
}

this_key.visibility = hidden;

}


//-------------time out for intro
var the_count_intro = 0;
var the_timeout_intro;
function doTimer_intro(my_key)
{

if (the_count_intro > 150)
{
x = clearTimeout(the_timeout_intro);
//write the html we need to the menu
text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='intro.html' target='display'>intro</a><br>" +
"<a href='intro.html#poll_anchor' target='display'>poll</a><br>" +
"<a href='intro.html#poll_anchor' target='display'>sign guestbook</a><br>" +
"<a href='http://pub.alxnet.com/guestbook?id=2441311' target='_blank'>view guestbook</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";
write_to_menu('intro', text);
return false;

}
else
{

the_count_intro = the_count_intro + 4;


b = document.getElementById('intro').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('intro').style.height = c;
the_timeout_intro = setTimeout("doTimer_intro();", 1);
}
}




//--------------time out for news
var the_count_news = 0;
var the_timeout_news;
function doTimer_news(my_key)
{

if (the_count_news > 150)
{
x = clearTimeout(the_timeout_news);



text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='news.html' target='display'>news</a><br>" +
"<a href='newslog.html' target='display'>news log</a><br>" + //make this into a new window.
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('news', text);
return false;
}
else
{


the_count_news = the_count_news + 4;

b = document.getElementById('news').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('news').style.height = c;
the_timeout_news = setTimeout("doTimer_news();", 1);
}
}

ukemike
08-12-2003, 10:34 AM
//---------------time out for discussion

var the_count_discussion = 0;
var the_timeout_discussion;
function doTimer_discussion(my_key)
{

if (the_count_discussion > 150)
{
x = clearTimeout(the_timeout_discussion);

text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='discussion.html' target='display'>discussion</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";
write_to_menu('discussion', text);
return false;
}
else
{


the_count_discussion = the_count_discussion + 4;

b = document.getElementById('discussion').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('discussion').style.height = c;
the_timeout_discussion = setTimeout("doTimer_discussion();", 1);
}
}



//---------------time out for events
var the_count_events = 0;
var the_timeout_events;
function doTimer_events(my_key)
{


if (the_count_events > 150)
{
x = clearTimeout(the_timeout_events);



text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='future.html' target='display'>phuture</a><br>" +
"<a href='past.html' target='display'>past</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('events', text);


return false;
}
else
{

the_count_events = the_count_events + 4;
b = document.getElementById('events').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('events').style.height = c;
the_timeout_events = setTimeout("doTimer_events();", 1);
}
}


//-------------time out for tutorials
var the_count_tutorials = 0;
var the_timeout_tutorials;
function doTimer_tutorials(my_key)
{

if (the_count_tutorials > 150)
{
x = clearTimeout(the_timeout_tutorials);



//write the html we need to the menu

text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='tut_hardware.html' target='display'>hardware</a><br>" +
"<a href='tut_software.html' target='display'>software</a><br>" +
"<a href='tut_studio.html' target='display'>studio</a><br>" +
"<a href='tut_other.html' target='display'>other</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('tutorials', text);
return false;
}
else
{

the_count_tutorials = the_count_tutorials + 4;

b = document.getElementById('tutorials').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('tutorials').style.height = c;
the_timeout_tutorials = setTimeout("doTimer_tutorials();", 1);
}
}




//-------------time out for production
var the_count_production = 0;
var the_timeout_production;
function doTimer_production(my_key)
{

if (the_count_production > 150)
{
x = clearTimeout(the_timeout_production);




text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='production.html' target='display'>eqipment</a><br>" +
"<a href='production_zines.html' target='display'>production magz</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('production', text);
return false;
}
else
{

the_count_production = the_count_production + 4;

b = document.getElementById('production').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('production').style.height = c;
the_timeout_production = setTimeout("doTimer_production();", 1);
}
}





//-------------time out for pictures
var the_count_pictures = 0;
var the_timeout_pictures;
function doTimer_pictures(my_key)
{

if (the_count_pictures > 150)
{
x = clearTimeout(the_timeout_pictures);



text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='pictures.html' target='display'>pictures</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('pictures', text);
return false;
}
else
{

the_count_pictures = the_count_pictures + 4;

b = document.getElementById('pictures').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('pictures').style.height = c;
the_timeout_pictures = setTimeout("doTimer_pictures();", 1);
}
}





//-------------time out for other ****
var the_count_**** = 0;
var the_timeout_****;
function doTimer_****(my_key)
{

if (the_count_**** > 150)
{
x = clearTimeout(the_timeout_****);


text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='****ed_pictures.html' target='display'>pictures</a><br>" +
"<a href='****ed_stories.html' target='display'>stories</a><br>" +
"<a href='****ed_other.html' target='display'>other</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('****', text);
return false;
}
else
{

the_count_**** = the_count_**** + 4;

b = document.getElementById('****').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('****').style.height = c;
the_timeout_**** = setTimeout("doTimer_****();", 1);
}
}




//-------------time out for links
var the_count_links = 0;
var the_timeout_links;
function doTimer_links(my_key)
{

if (the_count_links > 150)
{
x = clearTimeout(the_timeout_links);



text = "<center><font family='fixedsys'><font size='-1'>" +
"<a href='organization_links.html' target='display'>organizations</a><br>" +
"<a href='dj_links.html' target='display'>djz/producers</a><br>" +
"<a href='other_links.html' target='display'>other</a><br>" +
"<a href='add_a_link.html' target='display'>all your link</a><br>" +
"<img src='menu_item.jpg'>" +
"</font></font></center>";

write_to_menu('links', text);
return false;
}
else
{

the_count_links = the_count_links + 4;

b = document.getElementById('links').style.height;
locator = b.indexOf('p');
a = b.substring(0, locator);
c = parseInt(a) + 4;
document.getElementById('links').style.height = c;
the_timeout_links = setTimeout("doTimer_links();", 1);
}
}



function animate(key_id) {

if (document.all)
{
var this_key = document.all(key_id).style;
visible = 'visible';
hidden = 'hidden';
} else if (document.layers)
{
var this_key = document.layer[key_id];
visible = 'show';
hidden = 'hide';
}

this_key.border = "1 solid white";




}

//write to menu function
function write_to_menu(id, text)
{

if (document.getElementById)
{
x = document.getElementById(id);
x.innerHTML = '';
x.innerHTML = text;
}
else if (document.all)
{
x = document.all[id];
x.innerHTML = text;
}
else if (document.layers)
{
x = document.layers[id];
text2 = '<P CLASS="testclass">' + text + '</P>';
x.document.open();
x.document.write(text);
x.document.close();
}


}
</script>
</HEAd>

<BODY BGCOLOR="black" text="red" vlink="red" alink="white" background="menu_pic.jpg">

<body onload="JSCTimeOutID = window.setTimeout('setMessage()',100);">


<FONT COLOR="RED">
<font face="fixedsys">
<a href="#" onMouseOver="my_script('intro');" >intro</a><br><br>
<a href="#" onMouseOver="my_script('news');">news</a><br><br>
<a href="#" onMouseOver="my_script('discussion');" >discussion</a><br><br>
<a href="#" onMouseOver="my_script('events');" >events</a><br><br>
<a href="#" onMouseOver="my_script('tutorials');">tutorials</a><br><br>
<a href="#" onMouseOver="my_script('production');">production</a><br><br>
<a href="#" onMouseOver="my_script('pictures');">pictures</a><br><br>
<a href="#" onMouseOver="my_script('****');">other ****</a><br><br>
<a href="#" onMouseOver="my_script('links');">links</a><br><br>
</font></FONT>
<br><br><center>
<IMG SRC="http://counter.digits.com/wc/-d/4/hardkoresic_K_nezz" ALIGN=middle WIDTH=60 HEIGHT=20 BORDER=0 HSPACE=4 VSPACE=2>
<font size="-2"><font color="red"><br>
[&nbsp;HUMANS HAVE BEEN&nbsp;]<br>
[&nbsp;INFECTED&nbsp;]<br></font></font>
</center>
<br>

<div id="intro" onMouseOver="animate('intro');">
</div>

<div id="news" onMouseOver="animate('news');">
</div>

<div id="discussion" onMouseOver="animate('discussion');">
</div>

<div id="events" onMouseOver="animate('events');">
</div>

<div id="tutorials" onMouseOver="animate('tutorials');">
</div>


<div id="production" onMouseOver="animate('production');">
</div>


<div id="pictures" onMouseOver="animate('pictures');">
</div>
<div id="****" onMouseOver="animate('****');">
</div>
<div id="links" onMouseOver="animate('links');">
</div>
</BODY>
</HTML>:confused:

Khalid Ali
08-12-2003, 10:45 AM
Thats not very wise to take this much room for a question.
And honestly you think some one will go through this all??????
You could have just uploaded your file as a text file or a zipped file.

ukemike
08-12-2003, 11:06 AM
oh sorry i didnt know u could upload files to this msg board.