473,395 Members | 2,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

execute javascript functions in the page load event

Hi group,

I have 2 js files where I have scrollfuntions.
Is it possible to execute the 2 funtions in the page load event ? What code
do i have to use to execute function1();function2() ?

At the moment I us the functions in the body onload tag but I have troubles
with it.

thx in advance,

Bernie V

--
http://www.djberniev.be
Nov 18 '05 #1
3 6590
Hi,

You can create a function, say function3(); and put the other two functions inside that. Then Put the function3() on the bodyonLoad event.
Like

function1(){
....
}
function2(){
...
}
function3(){
function1();
function2();
}

then

<body onLoad="javascript:function3()">

Hope this helps....

Regards,
Bhaskardeep Khaund

Nov 18 '05 #2
also checkout - Page.RegisterStartupScript
-----Original Message-----
Hi,

You can create a function, say function3(); and put the other two functions inside that. Then Put the function3()
on the bodyonLoad event.Like

function1(){
....
}
function2(){
...
}
function3(){
function1();
function2();
}

then

<body onLoad="javascript:function3()">

Hope this helps....

Regards,
Bhaskardeep Khaund

Nov 18 '05 #3
thx for the replies

I'll try it.

gr

Bernie V

--
http://www.djberniev.be
"Bernie V" <bernd.vantyghem@pandoradotbe> schreef in bericht
news:eF**************@TK2MSFTNGP11.phx.gbl...
Hi group,

I have 2 js files where I have scrollfuntions.
Is it possible to execute the 2 funtions in the page load event ? What code do i have to use to execute function1();function2() ?

At the moment I us the functions in the body onload tag but I have troubles with it.

thx in advance,

Bernie V

--
http://www.djberniev.be

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Martin Walke | last post by:
Hi, This may seem like a client side problem but.... I have web pages that are made up of a number of javascript include files as well as 'in page' script. They all work fine running locally...
6
by: Erik Steffl | last post by:
I am trying to create a simple custom web spider using mozilla and javascript, the basic functionality is to open a website and then manipulate it using DOM (possibly opening links etc.). it...
5
by: Scott Natwick | last post by:
Is there a way to execute a JavaScript from the Page_Load event? Or alternatively, is there a way to have it execute when the page is loaded? I am defining the script in the Page_Load event and...
6
by: sylcheung | last post by:
Hi, How can I be notified when the document load is complet in JavaScript? I am referring to the whold document load is complete, mean all images/external files/frame/iframes have been loaded. ...
6
by: simon | last post by:
hello, what code would i use to kick off a javascript script after i had registered it? If (Not Page.IsClientScriptBlockRegistered("jsScript")) Then Page.RegisterClientScriptBlock("jsScript",...
6
by: acord | last post by:
Hi, In a html page, I don't know how to load in a php page from javascript. I've already defined a <div id="treemenu"> in the html page. The executed content from the php script is supposed...
6
by: drec | last post by:
I am just learning Javascript and I would like to create a basic form that gives me two options. This will be using either checkbox or radio input type, however I would like the second option to...
19
by: maya | last post by:
hi, so what is "modern" javascript?? the same as "DOM-scripting"? i.e., editing content (or changing appearance of content) dynamically by massaging javascript objects, html elements, etc? ...
7
by: btreddy | last post by:
Hii all , desperately looking for help. i want to execute one java script function,passvalues(), which is there in my master page. After doing so much of additions , subtraction and type...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.