iframe onload event

Introduction:-

This article describe; How to add onload event on iframe? This help to perform some action once iframe get load.
For example; on button click i display loading image and as soon as iframe content loads ; i hide loading image.

Detail:-

You define onload event on iframe as below example:-

iframe

And then write javascript as below mention:-

1
2
3
4
5
6
7
<script type="text/javascript">
function iframeonload(){
 
alert("Iframe loaded");
// here actually i write code to make loading image invisible.
}
</script>

Thanks!
Avinash

calendarJuly 21, 2012 · cardInfoyen · comments2 Comments
tagTags: ,  · Posted in: ASP .NET, JavaScript

2 Responses

  1. stepan - October 16, 2012

    Thanks very nice information!

  2. kristina - October 16, 2012

    Thank you. very nice. It helps!

Leave a Reply

Spam Protection: , required

myworldmaps infoyen