FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Picture album

 


fragment
Hi!
I think i should make a image album on the net, but i really dont know how to write the code for this. I can basic html, but how can I make a "filmstrip" of pictures and when people click a image, its displayed big over the small thumbnails?
LukeakaDanish
You want some javascript...i'll write you something & post in a couple of mins...

Luke
LukeakaDanish
Code:

Place this inside your <head>:

<script langauge="javascript" type="text/javascript">

<!--

pictures = new Array('BIGpictures/mypicture0.jpg','BIGpictures/mypicture1.jpg');

//In the above array, insert paths of pictures inside single quotes, seperated by commas.;

function displayPicture(thePic) {   
   picWin = window.open(pictures[thePic], 'picWin', 'width=500,height=500');         //Change the height and width as you wish;
}

-->

</script>

Place this where you want your images:

<div style="width:500px; height: 100px; overflow: auto;">

<img src="###.###" onclick="displayPicture(#);">

<!-- add more pictures here!-->

</div>

<!--Replace the src with the src of your thumbnail picture. Replace last "#" with the number your large picture has in the array above. NOTE: the first picture has the number 0. The second picture has the number 1 etc.


This should make a "windows xp explorer" style filmstrip...


Last edited by LukeakaDanish on Wed Feb 08, 2006 7:56 pm; edited 1 time in total
fragment
Thank you. It works like hell:)
I need to learn more code;)

-Steinar Lundemo
fragment
Really. This is a good script. Its easy to understand and it really rocks! I recommend this to all of you who need a online photo-album
LukeakaDanish
HAHA..no problem...if you look at the posting times you can see it took exactly 10 minutes to do...so its no big deal...Very Happy

If you need any further scripting support, please pm me or summit...
bluffmango
thats a fine piece of javascript, is there a javascript to run video files,, like i only want to upload files into a webfolder and the script shud have a link to these files and they shud be pllayed in a new html window with customizable header and footer
LukeakaDanish
er...that would be quite a lot more difficult to write, so you will have to find it on the net instead of me writing it for you...but im pretty certain its all possible...

maybe it would be easier to write in php...

btw, what do you mean with "customizable header/footer"?

Luke
bluffmango
by header and footer i mean...that when i person clicks on a link the video opens in a new window in an html page whose header and footer are defined by me...like that all video files placed in folders of my website are played by that script and i dont have to make a separate page for each video file
Reply to topic    Frihost Forum Index -> Scripting -> Website Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.