On Jul 9, 2007, at 12:39 PM, BeeRich wrote:

> OK, I moved the script below the target div, and she worked!  Can you
> explain that one to me again?  The elements in question have to be
> "declared" in the normal html BEFORE the JS can make functions
> operable?  Is this correct?  If so, is this theoretically backwards to
> what middleware devs would usually expect?

This is expected behavior. If you want to declare things first, then 
wrap them inside a page-level observer, like this:

function changediv()
...
}

Event.observe(window,'load',function(){
        Event.observe('iframe','load','changediv');
});

The function won't fire until the entire window is loaded, thus 
satisfying your required elements in order for $('imageShow1') to 
actually exist.

Walter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to