Refreshing image box with new image

D

Dev

How can I refresh an image box or place holder with new image without
refreshing the entire page. I would like to have a navigation link
above it. The desired page is locagted here http://www.polchem.in/perfume.html,
I want the link to work after I click on the product name above it.
Thanks for any help.

- Dev
 
E

Erwin Moller

Dev schreef:
How can I refresh an image box or place holder with new image without
refreshing the entire page.

By changing the src attribute of the image.
eg:
<img src="picture1.png" id="myImg">

and then from JavaScript:
var theImgRef = document.getElementById("myImg");
theImgRef.src="anotherimage.png";

Of course you can also preload the image, which will reduce the time it
takes to show the new one. Google for it.

I would like to have a navigation link
above it. The desired page is locagted here http://www.polchem.in/perfume.html,
I want the link to work after I click on the product name above it.

Didn't check that. ;-)

Regards,
Erwin Moller

Thanks for any help.

- Dev


--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top