ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  ImageMap HTML and XML
Posted by McKesson on Apr-02-2009 02:21
The image map produced by COM+ Chart Director looks like this:
<map name="hl_graph_map">
<area shape="rect" coords="51,513,165,625" title = "Drill to FIELD_004" href="javascript:drill('NULL', 'graph');">
<area shape="rect" coords="206,67,320,625" title = "Drill to FIELD_004" href="javascript:drill('01', 'graph');">
<area shape="rect" coords="361,402,475,625" title = "Drill to FIELD_004" href="javascript:drill('cat\\'zzz', 'graph');">
<area shape="rect" coords="515,179,629,625" title = "Drill to FIELD_004" href="javascript:drill('do\\'g', 'graph');">
<area shape="rect" coords="670,290,784,625" title = "Drill to FIELD_004" href="javascript:drill('li|zard\\\\ddd', 'graph');">
</map>

We are passing the image map into Flex as XML, but since the <area> tag is not closed it's not valid. Is there anything we can do to tell ChartDirector to close the <area> tag? If not, what do you recommend as a solution to make the area tag look like <area.../>?

  Re: ImageMap HTML and XML
Posted by Peter Kwan on Apr-02-2009 16:13
Hi McKesson,

Currently, ChartDirector outputs image maps that are 100% HTML compliant, and hence usable in all browsers and anything that supports HTML. We cannot ensure it will work on systems that does not support HTML. (If Flex insists on XML, obviously it does not fully support HTML.)

In your case, I think the best method is to check if "/>" exists in the output. If not, then replace all ">" with "/>".

It works because in HTML, the only place that can have ">" is at the end of the tag, and for image maps, the only possible tag is the <area> tag.

For example, in VB/VBScript, the code may be like:

If InStr("/>", imageMap) = 0 Then imageMap = Replace(imageMap, ">", " />")

Hope this can help.

Regards
Peter Kwan