I have a function called loadXMLDoc which takes text from the url parameter and sets it inside the parameter name of another page that has the same span name. im trying to use onload to make it into one line by using onload instead of having it in 2 lines.
<span id="span number1" onload="loadXMLDoc('www.url.com','span number1')"></span>
<span id="span number1"></span>
<script> loadXMLDoc("www.url.com","span number1");</script>