Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP: Java Site Check Please 1

Status
Not open for further replies.

whiskey3

Technical User
Mar 29, 2002
8
Link here:


when the animation plays the javascript underneath the images will say "undefined"

I have no clue what this means in java or where it's coming from?

Also is there a way I can lose the

<TD align=center><Span id=Cap1></Span><br></TD>
<TD align=center><Span id=Cap2></Span></TD>

or lose the Caption text?


WOLF VIDEO
 
You have this for instance.

[tt]var Pic1 = new Array()
Pic1[0] = 'Pic1[1] = 'Pic1[2] = 'Pic1[3] = 'Pic1[4] = 'Pic1[5] = 'Pic1[6] = 'Pic1[7] = '
var Caption1 = new Array()
Caption1[0] = "";
Caption1[1] = "";
Caption1[2] = "";
[/tt]
You must initialize Caption1 to the same length as Pic1, hence you have to add these.
[tt][red]
Caption1[3] = "";
//etc etc
Caption1[7] = "";
[/red][/tt]
Same thing for all the other PicX and CaptionX.
 
Why not make those things into objects, since they're related and belong together?

Code:
var item1 = new Array(), ii = 0;
item1[ii++] = {Pic:'[URL unfurl="true"]http://www.moldex.com/images/intropages/foamplugs/6615.jpg',[/URL] Caption:''};
item1[ii++] = {Pic:'[URL unfurl="true"]http://www.moldex.com/images/intropages/foamplugs/camoplugs.jpg',[/URL] Caption:''};
item1[ii++] = {Pic:'[URL unfurl="true"]http://www.moldex.com/images/intropages/foamplugs/plugstation.jpg',[/URL] Caption:''};
item1[ii++] = {Pic:'[URL unfurl="true"]http://www.moldex.com/images/intropages/foamplugs/puracones.jpg',[/URL] Caption:''};
item1[ii++] = {Pic:'[URL unfurl="true"]http://www.moldex.com/images/intropages/foamplugs/purafit.jpg',[/URL] Caption:''};
//and so on

and then create objects of any other type the same way.

You reference the properties of the objects like:

Code:
item1[desiredindex].Pic;
item1[desiredindex].Caption;

Lee
 
I actually don't see a need for the caption since I'm just adding hyperlinks to text below the images......can I just delete the caption part of the script all together? Is this an easier fix?

WOLF VIDEO (818) 905-WOLF (9653)
Production * Digital Editing * Graphics * Internet
web: email: support@wolfvideo.net
 
Sure, that ought to work fine. Make sure you remove the references to the caption arrays in your functions, too.

Lee
 
Thanks a bunch trollacious.....that did the trick.......great forum and thanks again.......

WOLF VIDEO
Production * Digital Editing * Graphics * Internet
web:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top