473,386 Members | 1,748 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,386 software developers and data experts.

<img onload= does not work in FireFox 1.0 but works in IE

Hi there,

Please help. I cannot get a javascript function to be called from an
img tag when the page loads. Here is a snippet of my code, and I'm
trying to call the MM_nbGroup function, but this is not working in
FireFox, only IE.

My function is there (so not missing).

<img src="Images/BTN_profile_over.jpg" name="profile" border="0"
id="Image1" onload="MM_nbGroup('init','group1','profile','Imag es/BTN_profile.jpg',1)">

Is there another way to call a function when an image loads? Please
help! Getting desperate!

Thanks,
Luke Venediger.
Jul 23 '05 #1
4 5396
Lee
Luke Venediger said:

Hi there,

Please help. I cannot get a javascript function to be called from an
img tag when the page loads. Here is a snippet of my code, and I'm
trying to call the MM_nbGroup function, but this is not working in
FireFox, only IE.

My function is there (so not missing).

<img src="Images/BTN_profile_over.jpg" name="profile" border="0"
id="Image1"
onload="MM_nbGroup('init','group1','profile','Ima ges/BTN_profile.jpg',1)">

Is there another way to call a function when an image loads? Please
help! Getting desperate!


Whatever is "not working" is in the function MM_nbGroup() or elswhere in code
that you haven't shown us.

The following test shows that the function is called:

<html>
<head>
<script type="text/javascript">
function MM_nbGroup(a,b,c,d,e,f) {
alert(a+"\n"+b+"\n"+c+"\n"+d+"\n"+e+"\n"+f);
}
</script>
</head>
<body>
<img src="Images/BTN_profile_over.jpg"
name="profile"
border="0"
id="Image1"
onload="MM_nbGroup('init','group1','profile','Imag es/BTN_profile.jpg',1)">
</body>
</html>

Jul 23 '05 #2
Hi,

Thanks for the reply. Does this snippet work in FireFox?

Cheers,
Luke Venediger.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
Hi Lee,

Thanks for the response - you are correct, this function works fine in
IE and FireFox. Back to the drawing board.

Cheers,
Luke Venediger.

Jul 23 '05 #4
Lee
Luke Venediger said:

Hi,

Thanks for the reply. Does this snippet work in FireFox?


yes

Jul 23 '05 #5

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

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
9
by: Wladimir Borsov | last post by:
As well known for <IMG ...> tags in web pages a width and a height attribute can be applied. What I want to do now is to fix the width for ALL the images on my web page to exactly lets say 70 pixel...
7
by: Zhang Weiwu | last post by:
Hello. This is problem puzzled me a long time. I wish to organize some block elements and let them flow one after each other like text. Think about a album, I wish the album have 12 thumbnails,...
22
by: David. E. Goble | last post by:
Hi All; I have a few of these; sigsImages="sigs/finished1.jpg" sigsImages="sigs/foghorn.jpg" lower I have;
15
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width:...
3
by: Henry Johnson | last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out how to programmatically populate a table cell as follows (from C# code-behind)? I've tried using a Literal control in the...
4
by: manu3d | last post by:
Hi everybody, I'm using the event "onload" to trigger a function when an image has been preloaded. But it seems to me that the function is triggered right at the beginning of the transfer from...
4
by: Jon Slaughter | last post by:
I have a captcha system going and for some reason when I use <?php $s = ""; for($i = 0; $i < 10; $i++) { $s = $s.rand(0,9); } $_SESSION = $s; $fn = '/Login/Register/Captcha.php'; echo '<img...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.