Onload

Hey,

I thought this to be the correct way to use onload inside javascript tags aposed to witihn the body tag…

<script type=“text/javascript”>
<!–
onLoad=AjaxRequest(‘main’,‘./includes/display.php?id=0’)
// –>
</script>

Doesnt appear to work… Is it incorrect?

Thanks

Your code seems to reply on other things are aren’t present in you example, so a link to your page that demonstrates the problem would be most helpful.

onLoad=AjaxRequest(‘main’,‘./includes/display.php?id=0’) works fine within the body tag… But I want to place it in the head tag within javascript tags instead…

Something else on your page might be replacing that onload event, or it cold be something else, which is why we need to see the problem as you experience it on your own test page.

Its sorted… had to place the code nearer to the bottom of the page apossed to in the head tags…

Thanks

There’s no such action as onLoad as JavaScript is case sensitive and requires event handlers names to be all lowercase.

Also onload effectively became obsolete when people started using the best practice of placing their scripts at the very bottom of the page where they don’t slow the loading of the page and where everything they need to reference will have already loaded.

Sweet… thanks for the info…