New to Java... need help with script

Discussions about anything Computer Hardware Related. Overclocking, underclocking and talk about the latest or even the oldest technology. PCA Reviews feedback
Post Reply
TruckStuff
Golden Member
Posts: 1056
Joined: Thu Feb 07, 2002 5:17 pm
Location: Dallas, TX

New to Java... need help with script

Post by TruckStuff »

I am a Java newby, although I have experience with structured programming. I am trying to write a script that displays a series of images (basically, a simple for loop). Here is the script that I have now:

Code: Select all

&#60script type='text/javascript'>
var x;
var images = new Array('/I/truckstuffusa_1714_57762239','/I/truckstuffusa_1714_57770303');
var spanHTML = "&#60image src="+images[[b][i]x[/b][/i]]+">

";
for (x = 0; x < 2; x++)
  document.write(spanHTML);
&#60/script>
As of now, the script does not display any images at all (just the red x place holder). However, if I change the x to 0 or 1 (specifically referencing one of the array elements), the script displays the appropriate image twice. From what I have found on the net, this code is accurate in terms of syntax and all. Can anyone give me some tips as to how to get this running? Thanks!
User avatar
Busby
Golden Member
Posts: 1890
Joined: Tue Nov 28, 2000 6:25 pm
Location: Atlanta Area, GA, USA
Contact:

Post by Busby »

Tried "var x = 0;"?
<a href="mailto:busby1218@charter.net">
<img src="http://justinbusby.com:8080/signature.gif" border="0"></a>
Post Reply