On Dec 24, 3:14 am, Alon Raskin <[email protected]> wrote: > Hi Everyone, > > Not sure if the problem is in front of the keyboard or behind it but I would > appreciate your insight. > > I have a UL element in my app which has a beforeload attribute set. This > calls my JS function to be called. Problem is that this event is only raised > if I navigate to my UL. If I simply load the page with the UL inside the Body > tags the JS doesn't get called. Does anyone if this is a bug? And if so, has > a fix been created for this.
It is not a bug as there is no "beforeload" attribute specified in HTML 4.01. Perhaps you are using a library that uses custom (non- standard) attribute? Isn't any script that executes before the load event "before load"? You could use the load event, but that happens after load and the UL element isn't specified as supporting it: <URL: http://www.w3.org/TR/html401/interact/scripts.html#adef-onload > > I guess the easy answer is to simply attach my JS to the onload of the BODY > but before I did that I wanted to see if there is a solution already out > there. The body element is the appropriate place for attaching onload listeners. Alternatively, you can place a script element immediately after the UL closing tag - that doestn't guarantee all the content of the UL has loaded, but should generally be OK. But don't you want *before* load? -- Rob -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" 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/iphonewebdev?hl=en.
