| Fiach's profileNetwork Programming in ....BlogLists | Help |
|
November 17 Firing an onchange event from a HTMLSelectElementSomething I just solved, which alot of people seemed to be stuggling with, is the ability to fire the onchange method of a select
box programatically from .NET (in this case VB.NET)
Basically the problem is, if you have a drop down list, stored in a HTMLSelectElement, and you set the selectedIndex propery, the onchange event doesn't automatically get called. - the same happens in Javascript - but you can't call onchange() like in Javascript, since it's a property, not a method.
Solution
hse.FireEvent("onchange", hse.onchange)
where hse is the HTMLSelectelement
November 10 Javascript redirect after images have loadedThis is a handy piece of javascript that can be used to execute a redirect only after all images have loaded on a page, up to a maximum of 10 seconds. I put in this maximum threshold, to account for the possibility of a bad link on the page, or a user with images turned off on their browser. waitForImages(); function ImagesLoaded() |
|
|