473,544 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is there any call before 'body onload'?

Hi NG

Is it possible to make a javascript call before "<body onload='...'>"?

What I'm doing is a preview of numerous images in an iframe and I want to
resize the iframe to match each picture. Normally I'd use the 'onload' (on
the src-page holding the image in the iframe) attrubute, but it's not called
until the picture has finished loading. I'd like to resize the iframe before
(or at the same time) the image starts loading.

Any ideas??
Med Venlig Hilsen

Ask Josephsen
Jul 23 '05 #1
2 10187
Ask Josephsen wrote on 30 aug 2004 in comp.lang.javas cript:
Is it possible to make a javascript call before "<body onload='...'>"?


<script>alert(0 )</script>
<body onload="alert(2 )">
<script>alert(1 )</script>

Elementary, my dear Ask?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #2
hehe

what a beauty :o)

thanks

--

Med Venlig Hilsen

Ask Josephsen
Partner og IT

web: www.MinReklame.dk

"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29...
Ask Josephsen wrote on 30 aug 2004 in comp.lang.javas cript:
Is it possible to make a javascript call before "<body onload='...'>"?


<script>alert(0 )</script>
<body onload="alert(2 )">
<script>alert(1 )</script>

Elementary, my dear Ask?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #3

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

Similar topics

3
4337
by: Raphael Gluck | last post by:
Hi Everyone Just a simple question If i have more than one Javascript in the head tag, and both have a body Onload how do i write the opening body tag? do i enter two Onloads? This didnt work for me. <body onLoad=" MM_preloadImages(etc...)" onload="runSlideShow()"> Can i have one onload call both? Please help me
1
4405
by: Peter Cartwright | last post by:
Is there a functional equivalent to <body onload="function call" in the main script. Can one do something like document.body.onload=function call?
2
3365
by: David Otton | last post by:
Hi, I'm seeing a difference in behaviour between window.onload = f(); and <body onload="f();"> Specifically, window.onload appears to fire before all the elements of the page have been rendered. As the difference is consistent across
2
7665
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would like mine to run immediately after it. So in the code below, what JS would i need to add to my "myfile.inc" page so that I could guarantee this...
7
6204
by: Calvin KD | last post by:
Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is my code sample (in html view): <HTML> <HEAD> .... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ....
1
8718
by: lwhitb1 | last post by:
I have been trying to load a javascript function from the body onload html tag, but I only want the function to load the first time the page is loaded: I have investigated but haven't found anything that works.. I thought about cookies, but what if the user's disable them? My code: //I want to call the Toggle function below only on the...
5
2294
by: tuxedo | last post by:
The way the <body onload="something()"works ensures that the complete html document is loaded before something() is executed. Can the same be achieved when placing the onload call in document somewhere except within the body tag, or must it always be in the body tag? For example, if this is placed elsewhere ... window.onload(something())
1
1835
by: shyamg | last post by:
hi.. in this below code i have to call the function in thsi function ia hve hide some fields in the body onload but its working fine but when ever i click that jsp page the page loding time its shows all the filds and that is hide .can i use any other event in this ..... <script language="javascript"> function Mysee(){ ...
2
6149
by: WGW | last post by:
Hello all, I need another set of eyes cause it just isn't working, no matter how identical I make it. The initRotator function works when called by itself, but when adding another function, only the "other function" works, not the initRotator function. Here's some examples of what I've tried 1st Example using the 2 functions on body tag: ...
0
7452
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7387
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7643
Oralloy
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. ...
1
7405
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...
0
5956
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5316
isladogs
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...
0
3436
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1862
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
1
1004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.