PDA

View Full Version : Javascript HELP



GoldenMerc
25-11-2009, 01:05 AM
Im trying to make a array of images then make it post a image heres what i got;



/* This is a test document.


Array. ROSS JENKINS. 0.1
function preloadImages(){
var ROSS=new Array();
myCars[0]="Test1";
myCars[1]="test2";
myCars[2]="test3";
pictures[3] = new Image(50, 50);
pictures[3].src = "ross.gif";
}
document.write(ROSS[0]);
var pictures = new Array(3);


Doesnt seem to work.
Ross PLEASEE HELPPP

pg.security
25-11-2009, 08:17 AM
I think you got the syntax wrong and aren't those css comment tags I'm so tired I would explain but I'm goin to bed

Agnostic Bear
26-11-2009, 09:57 PM
Im trying to make a array of images then make it post a image heres what i got;



/* This is a test document.


Array. ROSS JENKINS. 0.1
function preloadImages(){
var ROSS=new Array();
myCars[0]="Test1";
myCars[1]="test2";
myCars[2]="test3";
pictures[3] = new Image(50, 50);
pictures[3].src = "ross.gif";
}
document.write(ROSS[0]);
var pictures = new Array(3);


Doesnt seem to work.
Ross PLEASEE HELPPP


/* is a multiline comment and needs to be closed with */

GoldenMerc
01-12-2009, 10:35 PM
So is that why it wasnt working?

Want to hide these adverts? Register an account for free!