Closed Thread Icon

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

 
MinutRice
Nervous Wreck (II) Inmate

From: Wilson, AR
Insane since: Jun 2000

posted posted 06-22-2000 06:35

I have an interface and I need a script so that when you move your mouse onto the button it changes (mouseover) but also put another image into a screen.

Thanks

minutrice

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-22-2000 07:38

Here's one I got from http://projectcool.com/ a while back, always worked well for me:

<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">
<!--
// NOTE: New Browser detection code, more effecient and allows Netscape 4.0
// And the new IE 4.0 which now supports image arrays.
//
// This code is now being used throughout the net, but this is the source
// you should refer to for updates. We're modifying it as the net changes.
//
// Copyright 1996-97 Project Cool, Inc. Used by the net, with permission but
// we would appreciate it if you would give us credit in the source or a link
// from your site. This statement must be included in the webpage.
// http://www.projectcool.com
//
browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 ))

MinutRice
Nervous Wreck (II) Inmate

From: Wilson, AR
Insane since: Jun 2000

posted posted 06-23-2000 07:17

ok I really am not for sure how to make that script work. I know I must put all that stuff in the header and put the other stuff in the body to call it but I'm not for sure what I am suppose to change in the functions and all that to get it to work and I'm not for sure about what to put in to call it. Thanks for the help. I may can figure it out.

MinutRice
Nervous Wreck (II) Inmate

From: Wilson, AR
Insane since: Jun 2000

posted posted 06-23-2000 08:04

Hey thanks again for taking the time to try and help me. I found a script at screamdesign that I used. It doesn't use functions and stuff though. It is just embedded straight into the html. It's rather simple. I'm currenly trying to learn javascript so I will hopefully understand more about what you posted. Thanks again.

MinutRice

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-23-2000 09:04

No problem. It's a long script with lot's of stuff, but not a lot to have to alter. If you end up wanting more info on it, just let me know <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

MinutRice
Nervous Wreck (II) Inmate

From: Wilson, AR
Insane since: Jun 2000

posted posted 06-23-2000 10:13

1. Could you look at my page and help me with a preloading script for the mouseover images?
2. I would like some more info on the script that you posted above. It seems like it is a better script than the one I used. I would rather use functions then have to type this stuff over and over again. I don't know what a blurp is. And what below that has to be altered? Thanks.

MinutRice

MinutRice
Nervous Wreck (II) Inmate

From: Wilson, AR
Insane since: Jun 2000

posted posted 06-23-2000 10:16

I forgot to post the url. http://redrival.com/minutrice/index2.html

Also I meant a blurb not a blurp <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

MinutRice

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 06-23-2000 16:16

Here is what I use. This was provided by bitdamaged, who gets all of the credit. It includes caching, error handling, and mouseover:

<!-- begin image caching script -->
<script language="JavaScript">
loaded=0;
window.onerror=null;
function preLoad(){
imgpath = new Array();
imgpath[0] = "images/side_pane_about.jpg";
imgpath[1] = "images/side_pane_contact.jpg";
imgpath[2] = "images/side_pane_contribute.jpg";
imgpath[3] = "images/side_pane_home.jpg";
imgpath[4] = "images/side_pane_views.jpg";
imgpath[5] = "images/side_pane_volunteer.jpg";
imgpath[6] = "images/side_pane_vote.jpg";
imgpath[7] = "images/side_pane_news.jpg";
imgpath[8] = "images/nav_highlight.gif";
imgpath[9] = "images/nav_lowlight.gif";
preloadImages(imgpath);
}
function preloadImages(the_images) {
an_image = new Array();
for(i = 0; i < the_images.length; i++){
an_image[i] = new Image();
an_image[i].src = the_images[i];
}
loaded = 1;
}
function swap(name, num) {
if(loaded){
document[name].src = an_image[num].src;
}
}
</script>
<!-- end image caching script -->

Then, your href tags would look something like this:

<a href="index.htm" onMouseover="swap('home','8'); swap('pane','3'); onMouseOut="swap('home','9'); swap('pane','6');">

This will swap two images on mouseover, and then swap them back on mouseout.

I have a test page at http://www.hackel4sheriff.com/index20.htm that you can look at for more info if need be.

Pat Richard
Web weenie

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-23-2000 17:23

Okay, the blurb is just the word they chose -- it changes the window status line on the mouseover.

All that needs to be changed in the script are the file names and the corresponding numbers for the images. I played around with the script and posted the results here: http://kublai_khan.tripod.com/temp/drastic.html

I cleaned up some of the html too -- you were missing alot of quotations, and had a bunch of un-needed stuff in some of your tags

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-23-2000 17:29

Whoa! just tried my own link and got a "bad request" error....hmmmmmm, guess tripod is having big problems still. Well, try the link, if it doesn't work before long I'll email you the stuff.
Oh yeah, I also converted the images from gfs to jpgs, just to cut my upload time while I was playing -- cut them from 133 kb to 75 kb total. I'd recommend saving as jpg whenever you're using graphics of this nature -- usually better quality and smaller file size <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">



well, I'm having problems left and right with tripod, images not showing and stuff, but you'll see it work even if one or tow of the images don't work because of the server <img border=0 align=absmiddle src="http://www.ozones.com/forum/rolleyes.gif">

[This message has been edited by DL-44 (edited 23-06-2000).]

MinutRice
Nervous Wreck (II) Inmate

From: Wilson, AR
Insane since: Jun 2000

posted posted 06-23-2000 21:58

I couldn't get it to work either. hmmm I when I saved them from photoshop I used the save for web feature and when I saved them as jpg they seemed to lose so much quality and be bigger. So I used the gif b/c it seemed to keep my images somewhat sharp and had a smaller file size. How should I save these things and what settings? I don't know much about what palletes to use either. the reason why I had no quotations on a lot of it b/c homesite didn't put them there. So I didn't bother to go back and change them. I had it set up and basic table and just changed it where need be. Thanks for the help from both of you guys. I'm about to leave for the weekend so it will be late Sunday or monday when I get back on here. I guess late Sunday is early Monday over there though

Minutrice

« BackwardsOnwards »

Show Forum Drop Down Menu