i am trying to write a function so that when a user enters onto a page selected images change with each page that is entered. the page uses an iframe to load the new data so i need to swap the images on the main page which holds the iframe inside it.
function swap_image{
document['imgMain'].src = title_commissioning.jpg;
}
in the body of the page
onload="swap_image"
would the code look something like the code above or would it need to be expanded because the images that are being change are not in the iframe.