Closed Thread Icon

Preserved Topic: problem in Javascript (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17691" title="Pages that link to Preserved Topic: problem in Javascript (Page 1 of 1)" rel="nofollow" >Preserved Topic: problem in Javascript <span class="small">(Page 1 of 1)</span>\

 
Eric
Obsessive-Compulsive (I) Inmate

From: Singapore
Insane since: Mar 2000

posted posted 03-24-2000 17:14

Hi, I need help on this javascript script.. It is found at http://cgworld.virtualave.net/newpage1.htm
When I rollover the button, a screen will appear, but the screen is not at the right place.. It should be at the center. Please help me.. Thank you.
<P>------------------

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-24-2000 21:27

document.images[0] refers to the image you want to change. Right now you have it set to image 0 (zero), or the first image on the page. Set it to a higher number (I think 7 will work) and it will change a different image.<P>BTW - on Internet Explorer 5, the table is set up a little weird, and the circle gets split up between the rows. Ah, I see - look at your source code. You have each TD tag set to HEIGHT="300", but the images set to smaller heights - you need to make the heights of the table cells smaller.

2winspapa
Bipolar (III) Inmate

From: Alaska, USA
Insane since: Mar 2000

posted posted 03-25-2000 00:26

The cells should be "103". I'm curious to see how it looks once it's fixed and ready to go
<IMG SRC="http://www.ozones.com/forum/wink.gif">

2winspapa
Bipolar (III) Inmate

From: Alaska, USA
Insane since: Mar 2000

posted posted 03-25-2000 00:29

Oh and BTW, I saw the same problem Slime mentioned (the one that will be fixed once you correct the cell size) with NSC 4.7 as well.

Eric
Obsessive-Compulsive (I) Inmate

From: Singapore
Insane since: Mar 2000

posted posted 03-25-2000 09:51

hi, thanks for responding to my message ^-^
I manage to put the circle together but the script just work strangly.. I want it appear at the center but it appear at the side.<P>Yup, I took slime advise, I change the screen..to 7 but unforunately it still don't work.. Actually I had used this script once and it works perfectly..
________________________________<P><script LANGUAGE="JavaScript">
<!--DocOzone's Javascript code, copyright 1997
window.onerror = null;
var netscape = 0;
var goodIE = 0;<P>browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3)
{ netscape = 1; }
if (browserName == "Microsof" && browserVer >= 3.01)
{ goodIE = 1; }<P> if (netscape &#0124; &#0124; goodIE) {<P>menu = new Array(13);
standard = new Array(13);
over = new Array(13);
standard[0] = new Image;
standard[1] = new Image;
standard[2] = new Image;
standard[3] = new Image;
standard[4] = new Image;
standard[5] = new Image;
standard[6] = new Image;
standard[7] = new Image;
standard[8] = new Image;
standard[9] = new Image;
standard[10] = new Image;
standard[11] = new Image;
standard[12] = new Image;<P>over[0] = new Image;
over[1] = new Image;
over[2] = new Image;
over[3] = new Image;
over[4] = new Image;
over[5] = new Image;
over[6] = new Image;
over[7] = new Image;
over[8] = new Image;
over[9] = new Image;
over[10] = new Image;
over[11] = new Image;
over[12] = new Image;<P>menu[0] = new Image;
menu[1] = new Image;
menu[2] = new Image;
menu[3] = new Image;
menu[4] = new Image;
menu[5] = new Image;
menu[6] = new Image;
menu[7] = new Image;
menu[8] = new Image;
menu[9] = new Image;
menu[10] = new Image;
menu[11] = new Image;
menu[12] = new Image;<P>standard[0].src = "newface/b7.jpg";
standard[1].src = "newface/b1.jpg";
standard[2].src = "newface/b2.jpg";
standard[3].src = "newface/b3.jpg";
standard[4].src = "newface/b4.jpg";
standard[5].src = "newface/b5.jpg";
standard[6].src = "newface/b6.jpg";
standard[7].src = "newface/cgworld.jpg";
standard[8].src = "newface/b8.jpg";
standard[9].src = "newface/p1.jpg";
standard[10].src = "newface/p2.jpg";
standard[11].src = "newface/p3.jpg";
standard[12].src = "newface/p4.jpg";<P>over[0].src = "newface/over/b7.jpg";
over[1].src = "newface/over/b1.jpg";
over[2].src = "newface/over/b2.jpg";
over[3].src = "newface/over/b3.jpg";
over[4].src = "newface/over/b4.jpg";
over[5].src = "newface/over/b5.jpg";
over[6].src = "newface/over/b6.jpg";
over[7].src = "newface/cgworld.jpg";
over[8].src = "newface/over/b8.jpg";
over[9].src = "newface/p1.jpg";
over[10].src = "newface/p2.jpg";
over[11].src = "newface/p3.jpg";
over[12].src = "newface/p4.jpg";<P>
menu[0].src = "newface/over/links.jpg";
menu[1].src = "newface/over/gbook.jpg";
menu[2].src = "newface/over/forum.jpg";
menu[3].src = "newface/over/myart.jpg";
menu[4].src = "newface/over/profile.jpg";
menu[5].src = "newface/over/submit.jpg";
menu[6].src = "newface/over/tutorial.jpg";
menu[7].src = "newface/cgworld.jpg";
menu[8].src = "newface/over/anime.jpg";
menu[9].src = "newface/over/cgworld.jpg";
menu[10].src = "newface/over/cgworld.jpg";
menu[11].src = "newface/over/cgworld.jpg";
menu[12].src = "newface/over/cgworld.jpg";<P>}
function msover(num) {
if (netscape &#0124; &#0124; goodIE) {
document.images[num].src = over[num].src;
document.images[7].src = menu[num].src; } }
function msout(num) {
if (netscape &#0124; &#0124; goodIE) {
document.images[num].src = standard[num].src;
document.images[7].src = menu[7].src; } }
function preload() {
if (netscape &#0124; &#0124; goodIE) {<P>}}
// -->
</script>
<P>------------------

Eric
Obsessive-Compulsive (I) Inmate

From: Singapore
Insane since: Mar 2000

posted posted 03-26-2000 07:36

Hi everyone, I'm wondering whether this script will work in a circle. Preivously, I did one(not a circle form) and it works alright. http://cgworld.virtualave.net/ This is my main page.. <P>I don't know whether I'm correct( this script don't work in circle) Could anyone tell me whether I'm correct.. ^-^ Thanks a millon<P>------------------

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-28-2000 06:24

OK, forget trying to find which image it should be based on number, that's always a pain. Take your image tag <P><img src="newface/cgworld.jpg"
width="231" height="148" alt="cgworld.jpg (10140 bytes)" border="0"><P> and add a "name" attribute to it, like <P><img src="newface/cgworld.jpg"
width="231" height="148" name="cgworld" border="0"><P>and then in the function call for...<P>document.cgworld.src = menu[num].src;<P>That'll fix the pointer to the middle section. I usually name all of the images, and put those names into a text array of my own, that way I KNOW which number is which image. Try it out, I talk about this in my javascript tute.<P>-doc-
<P>------------------
----- Doctor Thaddeus Ozone --------- "Specialization is for insects"---
  --- OZONE pages .................................. http://www.ozones.com/
    - Hands-On Tutorials ............ http://www.ozones.com/handson/

« BackwardsOnwards »

Show Forum Drop Down Menu