Try this structure and make sure that tag <script>
is not part of apex form:
<apex:form>
<!-- other stuff -->
<apex:actionFunction name="doCallout" action="{!callout}" rerender="none"/>
<!-- other stuff -->
</apex:form>
<script>
window.onload=function()
{
doCallout();
}
</script>
Note: I am assuming that you don't want to use action
attribute of <apex:page>