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 ]