Log in

View Full Version : Script has no name - sequential image load on page load



vkbarefoot
07-04-2007, 12:33 AM
The script has no name but can be found at:

http://www.dynamicdrive.com/forums/showthread.php?t=8136

It was posted by jscheuer1.

I would like to know if it is possible to link the images to pages within the site.

thetestingsite
07-04-2007, 12:37 AM
Try this:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<noscript><img src="files/1_side.jpg"></noscript>
<script type="text/javascript">
function robin(){
//Set Your Images in the below Array:
var robin_im=['files/1_side.jpg', 'files/2_side.jpg', 'files/3_side.jpg', 'files/5_side.jpg', 'files/8_side.jpg']

//set the links in the below Array:
var robin_link=['about.html', 'test.php', 'files/3_side.jpg', 'files/5_side.jpg', 'files/8_side.jpg']

//////////////// Stop Editing //////////////////
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}
var num=readCookie('robim')? readCookie('robim')*1 : 0;
document.write('<a href="'+robin_link[num]+'"><img src="'+robin_im[num]+'"></a>')
num=num<robin_im.length-1? num+1 : 0;
createCookie('robim', num);
}
robin();
</script>

</body>
</html>


Hope this helps.

vkbarefoot
07-04-2007, 12:59 AM
Yes ... thank you ... but am I supposed to do something with

document.write('<a href="'+robin_link[num]+'"><img src="'+robin_im[num]+'"></a>')

The images appear in order on page load .... please look at the code

thank you for your time

thetestingsite
07-04-2007, 01:03 AM
Yes ... thank you ... but am I supposed to do something with

document.write('<a href="'+robin_link[num]+'"><img src="'+robin_im[num]+'"></a>')


No, just add your urls to the robin_link Array and that's it. I simply highlighted the part you listed above to show what else I changed in the script.

Hope this helps.

vkbarefoot
07-04-2007, 01:03 AM
Actually, after publishing it - it looks and works great ... thank you

the site i'm working on is http://www.vikibarefoot.com/Nash

vkbarefoot
07-23-2007, 08:19 PM
http://www.dynamicdrive.com/forums/showthread.php?t=22318&highlight=function+robin

I love these scripts. I do sites for professional artists and this is a stunning element to ad to their home pages.

I wonder why I am getting a blue or purple border around the images. It wasn't that way on the other site and I can't seem to fix it.

Thank you ... I love this site ...:confused:

vkbarefoot
07-23-2007, 08:20 PM
http://www.dynamicdrive.com/forums/showthread.php?t=22318&highlight=function+robin

That would be seen at http://www.vikibarefoot.com/BethNash

Sliight
07-24-2007, 08:06 AM
Very cool looking website... I almost hate looking at others sites because they make mine look bad!!! :)

If you're messing around with images, you may want to peek at this Smashing Magazine article. They are something I'd like to use at some point, but I just don't do enough with images yet. I plan on using a few when I put up the "fun stuff" portion of my site, funny photos etc... Take a peek: http://www.smashingmagazine.com/2007/05/18/30-best-solutions-for-image-galleries-slideshows-lightboxes/

Sliight
07-24-2007, 08:09 AM
One other side note... Your e-mail addresses when I click them try and force me to use yahoo e-mail to contact you. Not everyone has a yahoo account.

Check out this script: http://www.dynamicdrive.com/emailriddler/

One other nice benefit is that it hides your e-mail address. Apparently from what I've read, harvesting bots snag your e-mail and then you get spammed to death. Granted you may want your e-mail visible to your clients, but I'd prefer to just use the "click here to e-mail me" thing. The only negative of course, is if they don't have a default e-mail editor. "shrug"

vkbarefoot
07-24-2007, 03:41 PM
Thanks for both the sites ... I'm sure I'll find a use for the image one at some point.

Do you use the emailriddler? You said that it brings up a screen to send a Yahoo email. When I click on it - it brings up a screen to send and Outlook message.

I guess it has to go somewhere!

Sliight
07-24-2007, 04:28 PM
Well when I moused over the e-mail addresses it showed a yahoo mail type link in the lower left of my browser.

I use the e-mail riddler myself yes, I have it on every page for the contact me link, and post it in certain articles as well.

It brings up my default e-mail, which for me is Outlook also. With help from the folks here I also set it up to auto populate a message and my phone numbers into the body of the message.