Hi
is it possible to load multiple onload events in the body tag?
Regards 6 4683
Michael Landberg wrote on 22 jun 2007 in comp.lang.javas cript:
is it possible to load multiple onload events in the body tag?
onload events are not "loaded" themselves.
<body onload='action1 ();action2();'>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
On 22 jun, 10:47, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
Michael Landberg wrote on 22 jun 2007 in comp.lang.javas cript:
is it possible to load multiple onload events in the body tag?
onload events are not "loaded" themselves.
<body onload='action1 ();action2();'>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Hi
Yes, excuse me for not making myself clear. I meant ofcourse calling
multiple functions from the body event.
But thank you for the answer.
A better way would be to attach an event to the body, and then simply
call one function:
function onLoadFunction () {
actionOne();
On Jun 22, 5:24 am, Michael Landberg <goodmin...@hot mail.comwrote:
On 22 jun, 10:47, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
Michael Landberg wrote on 22 jun 2007 in comp.lang.javas cript:
is it possible to load multiple onload events in the body tag?
onload events are not "loaded" themselves.
<body onload='action1 ();action2();'>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Hi
Yes, excuse me for not making myself clear. I meant ofcourse calling
multiple functions from the body event.
But thank you for the answer.
You could also just attach a function to onload that calls two or more
actions:
<body onload="onLoadF unction();">
function onLoadFunction( ) {
actionOne();
actionTwo();
ed wrote on 22 jun 2007 in comp.lang.javas cript:
On Jun 22, 5:24 am, Michael Landberg <goodmin...@hot mail.comwrote:
>On 22 jun, 10:47, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
Michael Landberg wrote on 22 jun 2007 in comp.lang.javas cript:
is it possible to load multiple onload events in the body tag?
onload events are not "loaded" themselves.
<body onload='action1 ();action2();'>
>Yes, excuse me for not making myself clear. I meant ofcourse calling multiple functions from the body event. But thank you for the answer.
[Please do not toppost on usenet]
You could also just attach a function to onload that calls two or more
actions:
<body onload="onLoadF unction();">
function onLoadFunction( ) {
actionOne();
actionTwo();
.
.
.
actionOneHundre d(); }
Indeed you could, but should the OP?
Keeps more JS out of the HTML which is cleaner.
An argument, be it a subjective one, not really related to the OQ.
You should also think
You could, should the OP?
about attaching the events from inside the JS. You can use the code
here:
http://therealcrisp.xs4all.nl/upload/addEvent_dean.html
No, I don't think that is up to the OP's level.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
ed wrote on 22 jun 2007 in comp.lang.javas cript:
On Jun 22, 5:24 am, Michael Landberg <goodmin...@hot mail.comwrote:
>On 22 jun, 10:47, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
Michael Landberg wrote on 22 jun 2007 in comp.lang.javas cript:
is it possible to load multiple onload events in the body tag?
onload events are not "loaded" themselves.
<body onload='action1 ();action2();'>
[please do not quote signatures]
>Yes, excuse me for not making myself clear. I meant ofcourse calling multiple functions from the body event. But thank you for the answer.
[Please do not toppost on usenet]
A better way would be to attach an event to the body, and then simply
call one function:
function onLoadFunction () {
actionOne();
Why would that be a "better" way?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pai |
last post by:
hello there,
I am trying to rersize the window it works find in IE but doea not work with mozilla
window.attachEvent(onload,MWSOnLoad);
window.onload = function (MWSOnLoad)
{
alert('hello');
window.resizeTo(810,750);
top.outerWidth=810;
|
by: Liming |
last post by:
Hi,
Here is my situation. I have a textarea on the page. When the page
loads, I need it to have some default text (which will be generated
dynamically)
so I did something like this
function init()
{
|
by: Emmanuel |
last post by:
Hi,
I'm working on a c# web app and require having some code which runs in the
page Load event of each page and to be reusable in other web apps.
So i decided to use a Class Library which contains a class that inherits
from the System.Web.UI.Page. the class contains an override of the OnLoad
event in which the common code is executed.
|
by: Opa |
last post by:
Hi,
I have a form with a javacript function that I wish to call before the
Page_Load event on the server side. The function is called in the onload of
window (ie. window.onload = "myfunction()"
Is this possible? If so how, If not is there a workaround ?
|
by: Matt Ratliff |
last post by:
Hello,
I would appreciate any assistance you have with the following
problem:
I have (as an example) an array of values as follows:
arrayvalues=new Array("0001","0003","0005") where each is the value
of an option in a select statement:
<select id="usertypes" multiple="multiple">
<option value="0033">data1</option>
| |
by: Mike Cain |
last post by:
Hi I have a JS library that I want others in my company to use that uses
AttachEvent (etc) to add a method to the onLoad event so that it is called.
Using this approach of course is good because then my onLoad event does not
clobber that of others programmers in my company that may be already using
onLoad for something else (in this case both their onLoad event and mine
will fire).
However I'm finding that in some cases it is important...
|
by: quoclinh |
last post by:
I have an aspx page with code behind that has the initial page load
code happens many times as user perform different action on the page,
such as select a drop down list. To be more clear, consider the
following code:
protected override void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
|
by: maria.iglesias.19 |
last post by:
Hya,
Is it possible to have onload events on elements other than the body
tag ?
Thanks in advance,
Maria
|
by: zepdad |
last post by:
I'm new to forum and am learning javascript. I appreciate your help and patience in advance. I run an image gallery website that uses an onload event called FitPic() to scale image and window sizes to fit the users monitor resolution. FitPic() creates certain variables that would be useful for other calculations, such as reporting the % of image scaling. However, since onload events occur last during rendering, the variables are not...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |