Possible Duplicate:
What html tags support the onload javascript event?
I have a page where i am trying to load same page on facebox style and if I place onmouseover link on that page and hover it just works fine but when I try with onload it is not triggering the event.
Here is my onmouseover event:
<a id="curpo" onmouseover="$.image({ ajax: \'http://way2enjoy.com/jquery/threadpreview/'.$thread['id'].'\' });return false;"
class="uiMediaThumb uiMediaThumbLarge uiMediaThumbAlb uiMediaThumbAlbLarge">
<span id="thumbback" class="uiMediaThumbWrap">
<img src="http://way2enjoy.com/files/icons/priview.png"></span></a>
This works just fine but the below code is not working:
<a id="curpo" onload="$.image({ ajax: \'http://way2enjoy.com/jquery/threadpreview/'.$thread['id'].'\' });return false;"
class="uiMediaThumb uiMediaThumbLarge uiMediaThumbAlb uiMediaThumbAlbLarge">
<span id="thumbback" class="uiMediaThumbWrap">
<img src="http://way2enjoy.com/files/icons/priview.png"></span></a>
Here is the live example:
http://way2enjoy.com/forums/viewthread/406828
Just below to red letters Listen Music Video Online users Photo
magnifier or zoom icon is there if we keep the cursor over that it shows but it does not show page onload.. for testing with mouseover you need to change the onload to onmouseover in Firebug.
the
onloadevent is not fired onaelements which is the reason why its not working. onload is primarily used for thebodyelement. If you want to run some code right after the a element is shown try putting a script tag after it like so: