If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > How do I add a "title" for images to this image javascript?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-06, 05:09
daiondoroga daiondoroga is offline
Registered User
 
Join Date: Aug 2006
Posts: 11
How do I add a "title" for images to this image javascript?

Hello, here is some image javascript I am using to show an image that I insert
and also a link to a different page when you click on the image.

I need to know how I would show a title for each image when the image is hovered over to add to this script. I think I need a new document.getElement, but I don't know how to incorporate it. Here is the script as it is now. Thank you very much!! Jen

arr=[

["image1.gif","page1.htm"],
["image2.gif","page2.htm"], // no comma at the end of last index
]

now=new Date()
nowDate=now.getDate()

function changeImg(){

if(nowDate>arr.length){
return
}

document.getElementById("img").src=arr[nowDate-1][0]
document.getElementById("link").href=arr[nowDate-1][1]

}

And this goes in the body section of the page...

<BODY onload="changeImg()">

<a href="#" id="link" target="_blank"><img border="0" id="img"></a>
__________________
http://www.NOSPAMMERSPLEASE.com

Affordable web design, web application development, content management systems and ecommerce solutions for small business
Reply With Quote
  #2 (permalink)  
Old 08-12-06, 13:54
dimis2500 dimis2500 is offline
Registered User
 
Join Date: Jan 2005
Posts: 362
alt

What do you mean title? "alt"?
You may use that some.setattribute(’alt’,some)
url.
And this is not a javascript forum.
Dimis
Reply With Quote
  #3 (permalink)  
Old 08-17-06, 13:06
Glime Glime is offline
Registered User
 
Join Date: Aug 2006
Posts: 1
what are the jbase web builder basic routine writing
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On