Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Get font color value

lonely_girl01lonely_girl01 Members
edited April 2013 in Sahi - Open Source

Can anyone help me in getting the color value of the font HTML element:
<td><font color="#CC0000">Discount</font></td>


Best Answer

  • edited June 2013 Answer ✓
    Hi Charmaine,
    Please follow these steps:

    1) open the file :

    2) search for the function : prepareADs()

    3) add the following line at the end of the function:
    this.addAD({tag: "FONT", type: null, event:"none", name: "_font", attributes: ["sahiText", "color", "face", "size"], action: "none", value: ""});

    4) save the js file.

    5) open the file:

    6) add _font at the end of the txt file.

    7) save the text file.

    8) restart sahi.

    You can now get the colour of the above element by :
    [code] _font("discount").color [code]

    If you still face any problems, please let me know.



Sign In or Register to comment.