Skip to main content
Participant
January 18, 2007
Question

Add Alt Attribute Info to a Custom Button

  • January 18, 2007
  • 2 replies
  • 740 views
I have created an alternative to editing the “whtbar.js” file to give an image alt attribute information. We have a custom button in our help file that needed alt information, but we had already incorporated the text into the button’s image and did not want to add the text label. We also did not like the visual border treatment that adding a text label did to the button.

I wrote this JavaScript function that will not only accomplish this, but it will also capture the functionality that RoboHelp creates for the OnClick event handler and duplicates it in an OnKeyPress event handler for that same button. I have successfully tested this script in both IE (IE 6.0) and Mozilla (Firefox 1.5), and it appears to work fine.
    This topic has been closed for replies.

    2 replies

    Inspiring
    January 8, 2014

    Solution is to set VAR BTN_TEXT=0; in whtbar.js. In a parent project, only the parent whtbar needs to be set

    Inspiring
    March 27, 2012

    where is the script?

    Jeff_Coatsworth
    Community Expert
    Community Expert
    March 27, 2012

    The OP probably tried to attach it to their post, but it was stripped by the forum software. Hopefully they can show a screenshot image (using the camera icon in the web interface) to display the coding.