wirehopper was trying to be helpful, but he didn't know you were having a hard time understanding HTML as well as Javascript.
The last piece of code you posted was incomplete code for a table in HTML.
As soon as wirehopper saw that, he realized he would have to write the code for you, and he didn't really want get involved and I don't blame him.
We aren't here to teach you how to write HTML, which is the basics you will need to continue to write any program.
But I am a bit more generous and I will help you a little bit more.
The following code sets up a basic HTML page, which by far is not all that you may desire for your page.
Like including a basic doc type declaration, which isn't absolutely necessary but something to consider.
With all that said, here is the code.
I start with an <html> tag,
then a <head> tag.
After the <head> tag I have included a <script> section which has a Javacript function with a Javascript routine.
This Javascript function will load an image into an HTML <image> object (or element, if you prefer).
Then a closing </script> tag.
Then a closing </head> tag.
Then a <body> tag.
Now after the <body> tag I have setup a basic HTML table which includes one row with one cell.
Then I end the document with closing </body> and </html> tags.
To run the Javascript function when the page loads, I used the onload event listener in the <body> tag.
Example:
HTML Code:
<html><head><script type="text/javascript">
function loadImage()
{
var monthImages = new Array("jan.jpg","feb.jpg","mar.jpg","apr.jpg","may.jpg","jun.jpg","jul.jpg","aug.jpg","sep.jpg","oct.jpg","nov.jpg","dec.jpg");
var d = new Date();
document.getElementById("banner").src="http://xyz.com/" + monthImages[d.getMonth()];
document.getElementById("banner").alt="http://xyz.com/" + monthImages[d.getMonth()];
}
</script></head><body onload="loadImage();"><table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td><img id="banner" src="http://xyz.com/jan.jpg" alt="http://xyz.com/jan.jpg" height="224px" border="0" width="694px" /></td></tr></table></body></html>
__________________
Jerry Broughton
Last edited by job0107; 02-23-10 at 11:11 PM.
The Following User Says Thank You to job0107 For This Useful Post:
from where the images r coming the folder now do i have to insert every image with table for img src which i inserted above like all 12 banner images and when i change my date on my system changes of the banner should work automatically? sorry im kinda new sorry for the mess and yea i tried to test it through my system in dreamweaver