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

swap image in netscape

hi, i am using the following to change an image from one to another.
below is a stripped down version of the code i am using:

function swaptheimage () {

document.GetElementById('theimage').src = 'images/newimage.gif';

}

this works fine in Internet Explorer, but in Netscape what would i
replace 'document.GetElementById('theimage').src' with??? cheers

burnsy
Jul 23 '05 #1
2 999
Impresive it works in Internet Explorer :o)

Remember : Java script is case sensitive!

document.getElementById('theimage').src = 'images/newimage.gif';

Kind Regards

Nick

"mr_burns" <bi******@yahoo.co.uk> wrote in message
news:65**************************@posting.google.c om...
hi, i am using the following to change an image from one to another.
below is a stripped down version of the code i am using:

function swaptheimage () {

document.GetElementById('theimage').src = 'images/newimage.gif';

}

this works fine in Internet Explorer, but in Netscape what would i
replace 'document.GetElementById('theimage').src' with??? cheers

burnsy

Jul 23 '05 #2
On 21 Apr 2004 05:01:52 -0700, mr_burns <bi******@yahoo.co.uk> wrote:
hi, i am using the following to change an image from one to another.
below is a stripped down version of the code i am using:

function swaptheimage () {
document.GetElementById('theimage').src = 'images/newimage.gif';
}

this works fine in Internet Explorer, but in Netscape what would i
replace 'document.GetElementById('theimage').src' with??? cheers


A simpler and more reliable solution is

document.images[ 'theimage' ].src = URL;

Mike
Please don't use tabs to indent code when posting to newsgroups. Change
them to spaces: between two and four.

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 23 '05 #3

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

Similar topics

3
by: Randell D. | last post by:
Folks, I'm still learning javascript - I've invested in a couple of books and reading online as much as possible. I'm pretty sure what I am suggesting is possible though I'm trying to weigh up...
2
by: Ohaya | last post by:
Hi, We've been having a problem with one particular page that has a button on it, and a "tall" image (top-to-bottom). The button calls some simple Javascript to print the frame in which the...
3
by: Dietmar Prantner | last post by:
Hello, I tried a Javascript on my homepage that works fine on Netscape, works nearlyx normal on Opera but does not work at all on Internet Explorer. Is there anybody out there who can help? I...
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...
14
by: Otto Meijer | last post by:
Hi everyone, for one of my projects I need to figure out the size of the swap file(s) of a certain system. The problem is I need to do this on a host of platforms like: HP_UX, Solaris, Linux,...
12
by: LAshooter | last post by:
I have a portfolio page which loads a dozen thumbnails and one large image. A friend helped me code a script (below) which will swap out the large image (named "imgLarg") when a different thumbnail...
4
by: lemat | last post by:
Hi, I use a radio button form in which users can select a color by clicking on a image. I would like this image to change to another one when it's chosen. (image with a "Chosen" Stamp in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.