Show_Image()...HELP!!!!

This is a discussion on "Show_Image()...HELP!!!!" within the JavaScript Forum section. This forum, and the thread "Show_Image()...HELP!!!! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 14th, 2007, 11:10
New Member
Join Date: Mar 2007
Location: Toledo, Ohio
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Show_Image()...HELP!!!!



See these emoticons? Well that's about how I feel right now as I have been trying to figure out what I am doing wrong on my so-called dynamically generated thumbnail viewer/slide show. Can someone please look at this array, and tell me how in the world I am supposed to write a show_image() function with it?

//here is my array
<script type="text/javascript" language="javascript">
<!--
var img_info = new Array (
{ fname: "happyme.jpg", title: "Happy Me", date: "February 23, 2007", time: "13:30pm", camera: "Ricoh", descr: "This is me when I'm happy." },
{ fname: "hardprogrammerface.jpg", Title: "Hard Programmer Face", Date: "February 8, 2007", Time: "20:00pm", Camera: "Panasonic", Descr: "This is me stressing because my code isn't working." },
{ fname: "lesshardprogrammerface.jpg", title: "Less Hard Programmer Face", date: "February 9, 2007", time: "18:06pm", camera: "Toshiba", descr: "Less stress because I figured out some portion of my code...artificial relaxation." },
{ fname: "Everybody0007.jpg", title: "My Granny", date: "June 26, 2004", time: "14:00pm", camera: "Samsung", descr: "Here is my grandmother, doing what she she does best, eating! This time it's her favorite, fried chicken." },
{ fname: "thekidsandsummer.jpg", title: "The Kids and Summer", date: "October 20, 2006", time: "17:00pm", camera: "LG", descr: "Here are my children hanging out with my little niece Summer." },
{ fname: "Summer%201.jpg", title: "Summer", date: "July 5, 2005", time: "12:00pm", camera: "HP", descr: "Here is my niece Summer again, being her usual cute self." },
{ fname: "little%20chris.jpg", title: "Little Chris", date: "September 8, 2006", time: "13:50pm", camera: "Acer", descr: "Here is my nephew, Little Christian; he's Summer's younger brother." },
{ fname: "At%20The%20Party0003.jpg", title: "Big Chris", date: "November 30, 2004", time: "20:30pm", camera: "Motorola", descr: "My brother, Big Christian, yes, Little Chris' dad - Summer's dad too." },
{ fname: "Da%20Basics0002.jpg", title: "My Sister", date: "December 5, 2005", time: "12:00am", camera: "Samsung", descr: "Here is my sister Torrie, being her usual comedic self." },
{ fname: "2-10-2007-21.jpg", title: "Panther", date: "February 28, 2007", time: "14:00pm", camera: "Ricoh", descr: "This is my cat Panther, this is his serious look." },
{ fname: "2-10-2007-20.jpg", title: "Boogie", date: "February 28, 2007", time: "14:01pm", camera: "Ricoh", descr: "This is my cat Boogie looking at himself in the mirror. He often tries to do battle with himself, thinking he is another cat." },
{ fname: "Me%20and%20my%20hubby.jpg", title: "Me and my Best Friend", date: "February 14, 2007", time: "18:45pm", camera: "Samsung", descr: "I have saved the best for last. This is me when I am my happiest, when I am spending time with my best friend - My Husband, Thomas." }
);
</script>

//and here is what I have written to generate my thumbnail pics
<script type="text/javascript" language="javascript">for (var i=0;i<img_info.length;i++){document.write("<img src='"+img_info[i].fname+"' width='60px' onClick='show_image()'>");}</script>

OK...so now I have little pics that click and dont do anything but give me an error, and lets not even talk about the functions that will start or stop the slideshow or show all images in sequence.

I really want to understand this, and I have been working with my instructor but nothing he is saying is making the lightbulb come on in my head. What am I doing wrong, or not doing at all...? Please help.
Reply With Quote

Reply

Tags
arrays, dhtml, javascript, variables

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43