Okay, hopefully I actually get to post this time. I don't know why but I'm having a really big problem with this forum.
Anyway, I suppose I could put it all in one but I did it like I did because it wouldn't work when I did it that way before and so I put that by itself and used the document.writln function to make sure it actually did what I wanted. So I know if I go document.writeln(me) it writes "ment1" which means that the variable me is defined as "ment1".
And that is the name for an image (right now that's just a test, I don't even have and image, just an area that I'm looking at to see if the coding works. When the code works then I'm going to apply to the id of divs so that I can do some cool stuff with them) so the image background should change from blue (that's what I have it at now) to red, but an error comes up saying that document.me is null or not an object.
Well, it's not really the colour I mean to change when I actually get the code to work. I just want to be able to call an element on the page like that so I can do anything with it, move it change the colour, size, whatever.
Originally posted by DJRobThaMan Well, it's not really the colour I mean to change when I actually get the code to work. I just want to be able to call an element on the page like that so I can do anything with it, move it change the colour, size, whatever.
This code should help you get down that pathway.
[J]ona
Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.
Originally posted by DJRobThaMan document.writeln function
Just so you know, it's actually a method (which is like a function but it's attached to a specific object or type of object). In this case, it's a built-in method of the document object.
Tell me if you need any help on those arrays.
[J]ona
Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.
Bookmarks