On line 16 and 17, it's supposed to be "new Array", not "new array". Javascript is case sensitive. |
|
The JavaScript library, project-1.js: |
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
On line 16 and 17, it's supposed to be "new Array", not "new array". Javascript is case sensitive. |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
You, good sir, have fixed a problem that has plagued me for quite a while. Now if I can only get object methods to work... |
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
Another similar problem that I've been bumping into quite often. |
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
This happens because the HTML site in not finised loading by the time your script is run, therefore when you use getElementByTagName() on the last line of the JS, the image tag hasn't been created yet, and therefore it doesn't return an object. |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
|
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
Well, that's because "pixelLeft" is your property. It doesn't mean anything to the browser, and therefore the browser doesn't act upon it. When I am looking for the right property, I use w3schools' css reference. |
|
Last edited by khh; 02-17-2010 at 12:42 AM.
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
|
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
That's because posLeft and pixelLeft aren't valid atributes at all. At least I've never heard of it. |
|
Last edited by khh; 02-17-2010 at 04:11 AM.
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
posLeft and pixelLeft do indeed exist, but they're not well liked evidently. |
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
Well, as long as they're supported, that's what counts. |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
OK, so you can check to see if it does or doesn't work. Maybe I forgot to implement one of your solutions. I have it online here for you to check the source code and test it. (Only the Start! button will work, BTW.) |
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
The problem is that you have body call setup() via the onload argument. Since setup doesn't exist, this holts the execution of the javascript. |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
|
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
I have been using that. I just failed to notice the little onload attribute in the <body> tag... I swear some browsers are so anally sensitive. |
|
Learn the art of lucid dreaming in a whole new way!
LD Count: 37 (35 DILD, 2 DEILD)
Hey Newbies! Did you read the main pages and the tutorials? It will help you immensely.
Zenventive: art, health, philosophy
You are dreaming!
Bookmarks