Dynamically creating an alt tag

Results 1 to 2 of 2

Thread: Dynamically creating an alt tag

  1. #1
    Rob Reid Guest

    Default Dynamically creating an alt tag

    I want to dynamically create what appears in the alt tag of an image. The form has a number of checkboxes and I have a function that creates a msg that relays the values in non techy speak. When the user hovers over an image I want the alt tag to call this function or get the results of it somehow and display it. I have tried doing a document.write('<img alt="' + getinfo() +'") which doesn't work. How can I do this or do something similar. I don't want an alert box.

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamically creating an alt tag

    Well, you know you can&#039;t do it with document.write because it generates a new page. I don&#039;t think you can alter the tag directly, but you can fudge it to look like one.<BR><BR>I think http://www.irt.org has a few examples -- check out their FAQs of JavaScript (it&#039;s pretty extensive)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts