Planned maintenance is scheduled for the week of June 15th - the exact date and time will be announced soon.
See More Details
Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
calling javascript function when my jsp is loaded
I want to call a javascript function on load page
well I tried this:
and:
But nothing works.
thanks in avance.
well I tried this:
and:
<script type="text/javascript">
window.onload=charger(){alert("coucou");}
</script>
<script type="text/javascript">
window.onload=function() {
alert("coucou");
}
</script>
<script type="text/javascript">
window.onload=charger;
function charger(){
alert("coucou");
}
</script>But nothing works.
thanks in avance.
Hi,
Try this
Regards,
Sandeep
Try this
<script type="text/javascript">
jQuery(document).ready(function() {
alert("san-d");
});
</script>Regards,
Sandeep
thanks
but it does not work may be because I have al older version :I use liferay 4.2
I guess jquery is available since liferay 4.3
but it does not work may be because I have al older version :I use liferay 4.2
I guess jquery is available since liferay 4.3
Community
Company
Feedback