Forum Moderators: open
I wanted to make a nice image with rollover menus (as in, you pass the mouse over part of the nav, and a little menu pops up with more links). I made such an image on ImageReady, and it worked perfectly in the preview. So, now I need to get it on the Internet. I have my own domain, and FileZilla for my FTP needs.
What ImageReady gave me was a .psd file, an .htm file, and a folder full of images for the slices, I presume. I upload all of these to my domain, and look at them: Most of the images load, but not those which are involved in the rollover part.
The code is too lengthy for this forum, so please go to www.graphixal.com/index2.htm and view the source code.
So, after untold hours of tearing around, headdesking and talking to friends, this is what my friend thinks is wrong; I copied her response exactly.
Dragon Lover 229: The script calls for if (document.images) blablabla etc. The problem is that there's no document.imgs command in the body of the work. So the script is looking for this command so that it can initiate the script because the script is dependant on this command it says if (document.images) "than do this thsi this"
Dragon Lover 229: but because it never fines said command it will no initiate. Solution, put the command in the body of the work. But that presents a problem because the command is a Javascript command and once you get into the body you're working in HTML
Dragon Lover 229: so.
Dragon Lover 229: that's your problem and I'm afraid I have no idea how to fix it. you can't just add document.images to the top because, like I said, that;s a javascript command and the browser has no idea what it means in an HTML context so it'll ignore it. But we can't just arbatraily stick a javascript line in there that says document.images because that alone doesn't mean anything
Dragon Lover 229: there's a context missing and I don't know how to make the context
That's her opinion- how do I fix this? If you think there's something else wrong, by all means inform me. I have the .psd file mentioned and the 'images' folder uploaded properly; all of them work except the part that pertains to the rollover- I pass my mouse over and little red 'x' broken images appear where the rollover links ought to.
You have no idea of the gratitude I would have if someone can help me fix this problem.
The script calls for if (document.images) blablabla etc. The problem is that there's no document.imgs command in the body of the work. So the script is looking for this command so that it can initiate the script because the script is dependant on this command it says if (document.images) "than do this thsi this"
document.images is a default collection (a kind of read-only array of all the image elements). The collection exists even if there a no images at all. The [blue]if(document.images){...[/blue] is there to stop execution by very old browsers, or other browsers that do not have a document.images collection and thus will not understand the script. When you rollover, you'll notice that something does happen, the images do change (to placeholders). So the script must be working to some extent.
Right-click a placeholder, choose "properties" and you'll find the intended source of the image.
Then look in the script, in the function
preloadImages for that assignment. As far as I can tell, the script is doing as it is told, but the images don't exist at the locations specified in that function.
Take the first assignment, for instance:
privaterollover_profile111_privaterollover_vote111_over = newImage("[red]images/privaterollover_profile111-.gif[/red]"); There exists no such image at this location relative to the page.