Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-report-designer-dev] Using datarow value in href for html <A> tag/Image Swap on Mouse Event

I need to use the value from a datarow in the href of an html <a> tag. I have tried doing this numerous ways in the BIRT designer but have been unable to do so. I cannot use a standard hyperlink, as the <a> tag encloses an image, and contains calls to JS functions for onMouseOver, onMouseOut etc that swap the image for these mouse events.
The link displays an image, and swaps the image on mouse over and mouse out events.
Effectively, I need a HTML string to be written to the report (web page) as:
"<a href='' _onMouseOver_='swapImage(" + row["image_code"] + " )""><img src=""/images/icon.gif" id+ row["image_code"] + "></a>
So, I am accessing the value for mc_code from the dataset row and I need to append it to the URL for XXXX.html. I am setting the ID of the image to the value for image_code from the datarow, and passing this to the mouse over/out event handlers.
I am unable to do this using a Dynamic Text component, as although you can access the values on the datarow using the <VALUE-OF> tag, this tag only be used to print text inbetween html tags e.g.
<a href=''><VALUE-OF>row["mc_code"]<VALUE-OF></a> is valid

<a href=''>test<VALUE-OF></a> is NOT valid.


I am sure there must be a way to do this, and appreciate any help received. This is easy to do in erdpro with a browser scripting control.....







Ray Wells

Mobile: +61 (0) 416 201105
Email: rmwells1979@xxxxxxxxxxx

How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos

Back to the top