Forum Moderators: open
onLoad="javascript:attach_file('mysql_insert.php');
This works perfect, but I need to load about 9 different pages when a certain page loads. I thought it would be easier to just use an onLoad function in the header, but I keep getting errors by doing this
onLoad="javascript:attach_file('mysql_insert.php'); ('plumbing_insert.php');
Can anybody help me out on how to load multiple pages with the onLoad function?
Thanks in advance
[edited by: DrDoc at 12:39 am (utc) on July 26, 2008]
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js" ></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js" ></script>
<script type="text/javascript">
YAHOO.util.Event.on(window, 'load', function() {
attach_file('mysql_insert.php');
attach_file('plumbing_insert.php');
// attach_file('someotherefile.php');
// and so on...
});
</script>