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

IE 6 swap image problem

1
Hello,

i have a problem swapping images in ie6. Apart from this browser it works fine in every other.

Expand|Select|Wrap|Line Numbers
  1. function swapimg(str){
  2. if(str=="new"){
  3. document.getElementById("btn1").src="img1.png";
  4. }
  5.  
[HTML]<a href="#x" onclick=\"swapimg('new');show('fn','news')\" >

<img name="btn1" id="btn1" border="0" src="img2.png" width="86" height="27" align="absbottom"></a>

[/HTML]I ve tried removing the ancor and doing: <a href="javascript:swapimg('new');" .....
but nothing again

Any help is appreciated
Nov 15 '07 #1
2 3344
Markus
6,050 Expert 4TB
Hello,

i have a problem swapping images in ie6. Apart from this browser it works fine in every other.

function swapimg(str){
if(str=="new"){
document.getElementById("btn1").src="img1.png";
}

<a href="#x" onclick=\"swapimg('new');show('fn','news')\" >

<img name="btn1" id="btn1" border="0" src="img2.png" width="86" height="27" align="absbottom"></a>

I ve tried removing the ancor and doing: <a href="javascript:swapimg('new');" .....
but nothing again

Any help is appreciated
Ok, the only thing i had to change was the last curly bracket.

Don't know if you missed that off when copying and pasting it here or what...

But yeh, that's all :)
Nov 15 '07 #2
acoder
16,027 Expert Mod 8TB
If that wasn't the problem, maybe the PNG image has alpha transparency. If so, it's not supported in IE6 and was fixed in IE7.
Nov 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Frank Bishop | last post by:
I have been trying to do image swaps and my second image does not show up, it just goes to a blank image on the mouseover. I have Windows XP SP2 and it prompts me to allow blocked content when the...
2
by: Matthew | last post by:
Hi all I'm looking for a solution that can be used in a calendar/gig guide scenario where each day is represented by a dot image. Now this dot must do the following 1. When the mouse goes...
2
by: broms10 | last post by:
I need help. I have a little button that says "next" below a big image, let´s call it "image1", when I press the button I want to swap the big image to "image2". And then if I press it again I...
6
by: Karl | last post by:
Hi, Ok so on a given page I have 4 text links: see it in black see it in blue see it in red see it in green using the standard swap image behavior, clicking on one of the above links
2
by: Barkster | last post by:
I have a image that I want to click and when clicked that image will be swapped and then show a hidden div. When another image like it is clicked it will swap image and hide that text and so on. ...
7
by: KiwiBrian | last post by:
On a web page I have a graphic for a Shopping Cart Submit button. It is within a form and working fine. I would like to perform an image swap to an identical graphic of a different colour when I...
3
by: steve.peticca | last post by:
Hi, My onmousevent fails to switch the large photo with one of the smaller images. To be frank, I'm extremely new to Javascript programming and as such, am trying to learn from other sites...
2
by: sabbas | last post by:
Sorry for my bad english. this is my second web work and things are a little bit difficult for me, so sorry if you not understand what i want for this two situations. First one is that I have 3...
5
by: sabbas | last post by:
Sorry for my bad english. this is my second web work and things are a little bit difficult for me, so sorry if you not understand what i want for this two situations. First one is that I have 3...
3
by: PEJO | last post by:
I'm not much of a JS programmer so I used the the standard Macromedia swap image function for a disjointed rollover..which works fine.. no problem swapping the image with that code.... but when...
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
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?
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
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,...
0
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...
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.