Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple functions at onLoad 1

Status
Not open for further replies.

jfain

Technical User
Jan 26, 2001
2
0
0
US
How can I load a function and a .js script at onLoad. Currently I am only able to get one or the other to function.
 
try something like this:

<body onload=&quot;loadFuncs()&quot;>
<script>
function loadFuncs()
{
function1()
function2()
}
</script> jared@aauser.com
 
jared I tried it but it did not work. the following are my two functions. The following are the two actions I want to take place.

<SCRIPT LANGUAGE=&quot;JavaScript&quot; src=&quot;../../menu.js&quot;></script>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Begin
closetime = 0; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = &quot;left=50,top=50,width=&quot; + WIDTH + &quot;,height=&quot; + HEIGHT;
preview = window.open(URL, &quot;preview&quot;, windowprops);
if (closetime) setTimeout(&quot;preview.close();&quot;, closetime*1000);
}

function doPopup() {
url = &quot;width = 297; // width of window in pixels
height = 153; // height of window in pixels
delay = 4; // time in seconds before popup opens
timer = setTimeout(&quot;Start(url, width, height)&quot;, delay*1000);
}
// End -->
</script>

</head>


<body OnLoad=&quot;doPopup();&quot;>



any suggestions.
 
whats inside menu.js? can you send me to the page you are trying this on? jared@aauser.com
 
Is this what you were referring to in your original message?

<body onload=&quot;hideworking();loadatstartup();&quot;>

This could include as many functions(); as your page may require. Don't forget the ;'s.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top