View Full Version : HELP PLEEEEAAAAAASE!
Weapon
January 27th, 2001, 18:41
Is the some script that I can put into my images that when the mouse goes over it the top picture changes?
For example:
I have picture A
and I have picture B
when I move the mouse over picture B, picture A turns into picture C
Koolguy
January 27th, 2001, 18:59
Check out http://javascript.internet.com
Weapon
January 27th, 2001, 19:15
Damn they don't have it tried http://www.javascripts.com but they have to much scripts and no database search engine
LeX
January 28th, 2001, 01:53
http://dynamicdrive.com <-- updates, good
http://shockdhtml.com <-- haven't updated for a while, but still got some good scripts
Weapon
January 28th, 2001, 02:34
I am also looking for a script where you have to visit a certain page before you visit another
for example:
I have page A
I have page B
to go to page B you first must visit page A
And please stop saying visit here and there because I have visited nearly all of them and non of them have it
RedHat
January 28th, 2001, 12:31
I ain't sure, maybe this will do the trick :
<SCRIPT TYPE="Text/Javascript" LANGUAGE="Javascript">
<!--
/* [-] If you didn't came from page A, you should be redirected to it.
[-] Didn't tested it */
if (document.referrer!='http://www.url.com/a.html') {
parent.location='http://www.url.com/a.html'; }
// -->
</SCRIPT>
it's just an idea, I didn't check it.
Some more specific information would be useful !
RedHat
January 28th, 2001, 13:16
Originally posted by Weapon
Is the some script that I can put into my images that when the mouse goes over it the top picture changes?
For example:
I have picture A
and I have picture B
when I move the mouse over picture B, picture A turns into picture C
quite easy:
this is the source of a page that I made with dreamweaver 4, that will work:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var z,j=d.MM_p.length,a=MM_preloadImages.arguments; for(z=0; z<a.length; z++)
if (a[z].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[z];}}
}
function MM_swapImgRestore() { //v3.0
var z,x,a=document.MM_sr; for(z=0;a&&z<a.length&&(x=a[z])&&x.oSrc;z++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
var p,z,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (z=0;!x&&z<d.forms.length;z++) x=d.forms[z][n];
for(z=0;!x&&d.layers&&i<d.layers.length;z++) x=MM_findObj(n,d.layers[z].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var z,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(z=0;z<(a.length-2);z+=3)
if ((x=MM_findObj(a[z]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[z+2];}
}
//-->
</script>
</head>
<body bgcolor="#FFFF00" text="#000000" onLoad="MM_preloadImages('pic_C.gif')">
<img src="pic_A.gif" width="120" height="20" name="picA"> <br>
<a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('picA','','pic_C.gif',1)"><img src="pic_B.gif" width="120" height="20" name="picB" border="0"></a>
</body>
</html>
or visit http://dimensions.netcabins.com/tst.html
to see how it works
tested in IE5.5 , NS 4.7 & NS6 !
Weapon
January 28th, 2001, 16:00
what if i want more pictures and the bottom pictues to be hyperlinks?
LeX
January 29th, 2001, 05:55
Originally posted by Weapon
I am also looking for a script where you have to visit a certain page before you visit another
for example:
I have page A
I have page B
to go to page B you first must visit page A
And please stop saying visit here and there because I have visited nearly all of them and non of them have it
Visit some warez site or roms page, some of them -----es got the script. :p
Like, you gotta click here (usually some banner) and there and then go find some word on the page that shows up after you click on the banners and then you can click here and enter the word you found, then you can see another page filled with ads and one tiny link to the real file. Really, though, all you gotta do is turn off javascript, and you've "cracked" the script. ;)
Another solution: you link to page B from page A. :D
laine
January 29th, 2001, 06:43
Originally posted by LeX
[QUOTE]
Another solution: you link to page B from page A. :D [/B]
LeX... agree agree..
the most simple way
although people can bookmark the page B afterwards
but still that's a good way,... and you don't have to waste so much time cracking sccriptss
laine
January 29th, 2001, 06:46
Originally posted by Weapon
Damn they don't have it tried http://www.javascripts.com but they have to much scripts and no database search engine
I agree.
Their search engine doesn't work properly anymore. javagoodies.com(which is now javascripts.com)used to have A LOT of scripts, like *nearly* whatever scripts you'd like you can key in the keyword and you'll get it
but now,
even if i key in puzzle there's none...
very strange
do you guys know of a good site where you can find lots of javascripts? there isn't much anymore...
LeX
January 29th, 2001, 06:51
javascript.internet.com <-- that's the URL, I think
I'd go take a look at DHTML scripts, they're basically JavaScripts, only better.
http://dynamicdrive.com :):):):):) - terrific
http://dhtmlshock.com :):):) - nice but haven't updated lately
laine
January 29th, 2001, 23:44
javascript.internet.com
is... not very good either
i forgot, anyways
Yep DHTML is great... but it doesn't work with very old browsers(tho i guess there wouldn't be a lot of people using netscape 3.0 ...or ie 3)
:)thanks!
Weapon
February 1st, 2001, 23:21
I got the script for the pictur one and I was wondering is there a way to preload the image in this script
<img border="0" src="images/logo.gif" name="a" width="150" height="80"></p>
<p align="center"><a href="home.html" onmouseover="document.images.a.src='images/logohome.gif'"
onmouseout="document.images.a.src='images/logo.gif'">
Koolguy
February 2nd, 2001, 00:03
http://javascript.internet.com/miscellaneous/preload-images.html
CW
February 10th, 2001, 06:53
The reason people were sirecting you to sites was because they may or justdo not feel like posting such a long reply. That, and what if they did a typo? :O The site that told you to gone to have been edited and worked on... So they wont have mistakes... and they'll have examples and everything.
Well.. I got this code for http://www.easyjavascript.net I consider it a very nice code ^_^ I was also looking around for the same code you were, for atleast three months :O
Well... Try this, you can edit it and everything. I'll just copy and paste what the site said, just to make it a little less confusing. There are also some other great codes at easyjavascritp.net!! ^_^
---------------------------------------------------
First thing to do is to put this in your <head></head> tag. You will need to edit ALT YOUR
CHANGING FIRST ALT IMAGE, YOUR CHANGING SECOND ALT IMAGE, IMAGE ON, and ALT IMAGE OFF. That
is your alternating image that changes, for example, mine are the numbers.)
<script language="JavaScript">
<!-- Hide from old browsers
// Copyright © 1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com
var NN3 = false;
image1alt = new Image();
image1alt.src = "YOUR ORIGIONAL ALT IMAGE";
image1alton = new Image();
image1alton.src = "YOUR CHANGING FIRST ALT IMAGE";
image2alt = new Image();
image2alt.src = "YOUR ORIGIONAL ALT IMAGE";
image2alton = new Image();
image2alton.src = "YOUR CHANGING SECOND ALT IMAGE";
function on3(name) {
document["altimg"].src = eval(name + "alton.src");
}
function off3(name) {
document["altimg"].src = eval(name + "alt.src");
}
NN3 = true;
function on(name) {
if (NN3) on3(name);
}
function off(name) {
if (NN3) off3(name);
}
// -->
</script>
Now put these lines anywhere in you HTML document
Linked Image #1:
<a href="YOUR LINK" onmouseover="on('image1');" onmouseout="off('image1')"><img src="YOUR FIRST IMAGE" border="0"></a>
Linked Image #2:
<a href="YOUR LINK" onmouseover="on('image2');" onmouseout="off('image2')"><img src="YOUR SECOND IMAGE" border="0"></a>
Changing Alternate Image:
<img src="YOUR ORIGIONAL ALT IMAGE" name="altimg">
Now change YOUR LINK, YOUR FIRST IMAGE, YOUR SECOND IMAGE, and YOUR ORIGIONAL ALT IMAGE. Now
if you want add more images, you'll have to adjust the top script by adding this additional
line (This is an example of how to add a third image image). This goes after the lines that
look identical.
image2alt = new Image();
image2alt.src = "YOUR ORIGIONAL ALT IMAGE";
image2alton = new Image();
image2alton.src = "YOUR CHANGING THIRD ALT IMAGE";
Notice how "image2alt" went to "image3alt" and "image2alton" went to "image3alton". To add
a fourth image you would replace all the "image3alt"'s with "image4alt" and so on.
Now put this link in the body of your document to make the third image visible.
Linked Image #3
<a href="YOUR LINK" onmouseover="on('image3');" onmouseout="off('image3')"><img src="YOUR THIRD IMAGE" border="0"></a>
Notice how the image number went up to "image3". Repet all the steps that I just showed you to put in a fourth or fifth image and change "image3" to "image4" or "image5". Same goes for "image3alt".
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.