Asif Mohd

Greenhorn
+ Follow
since Mar 07, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Asif Mohd

I can think of couple of ways

1. Attach an event with the body tag using javascript like this

<script language="javascript">
if(body.attachEvent){
body.attachEvent("onload", func);
}

function func(){
//do some thing
}
</script>

This works in IE. Checkout how to do with other browsers if you need to support them.

2. The other option is to hava a simple javascript function at the end of the html content generated by your portlet

<div>
:
<!--content generated by portlet-->
:
</div>
<script language="javascript" defer>
function func(){
//do some thing here
}

//put a call to the above function here
func(); //or better yet, call this using window.setTimeout(...)

</script>
[ March 07, 2006: Message edited by: Asif Mohd ]
18 years ago