Xbasic
UI_HOTSPOT_FROM_MAP Function
Syntax
C Result = UI_HOTSPOT_FROM_MAP(imageMap as c[,attribute as c])
Arguments
- imageMap
Image map to use to generate UI hotspots
- attribute
(optional) Attribute to apply to generated hotspots, e.g. "href"
Description
Converts an HTML image map to a ui_hotspots list.
Example
This is an interactive Xbasic session.
dim htmlMap as c htmlMap = <<%map% <map name="chart1" id="chart1"> <area shape="rect" coords="407,128,434,169" onmouseover="hover(1,4)" onmouseout="leave(1,4)" alt="" /> <area shape="rect" coords="339,49,367,128" onmouseover="hover(1,3)" onmouseout="leave(1,3)" alt="" /> <area shape="rect" coords="272,92,299,128" onmouseover="hover(1,2)" onmouseout="leave(1,2)" alt="" /> <area shape="rect" coords="204,71,231,128" onmouseover="hover(1,1)" onmouseout="leave(1,1)" alt="" /> <area shape="rect" coords="136,90,163,128" onmouseover="hover(1,0)" onmouseout="leave(1,0)" alt="" /> <area shape="rect" coords="380,128,407,161" onmouseover="hover(0,4)" onmouseout="leave(0,4)" alt="" /> <area shape="rect" coords="312,122,339,128" onmouseover="hover(0,3)" onmouseout="leave(0,3)" alt="" /> <area shape="rect" coords="244,77,272,128" onmouseover="hover(0,2)" onmouseout="leave(0,2)" alt="" /> <area shape="rect" coords="177,39,204,128" onmouseover="hover(0,1)" onmouseout="leave(0,1)" alt="" /> <area shape="rect" coords="109,126,136,128" onmouseover="hover(0,0)" onmouseout="leave(0,0)" alt="" /> </map> %map% dim hs as c 'create a 'hotspot' string from an HTML map hs = UI_HOTSPOT_FROM_MAP(htmlMap) ?hs =407,128,28,42!<area shape="rect" coords="407,128,434,169" onmouseover="hover(1,4)" onmouseout="leave(1,4)" alt="" /> 339,49,29,80!<area shape="rect" coords="339,49,367,128" onmouseover="hover(1,3)" onmouseout="leave(1,3)" alt="" /> 272,92,28,37!<area shape="rect" coords="272,92,299,128" onmouseover="hover(1,2)" onmouseout="leave(1,2)" alt="" /> 204,71,28,58!<area shape="rect" coords="204,71,231,128" onmouseover="hover(1,1)" onmouseout="leave(1,1)" alt="" /> 136,90,28,39!<area shape="rect" coords="136,90,163,128" onmouseover="hover(1,0)" onmouseout="leave(1,0)" alt="" /> 380,128,28,34!<area shape="rect" coords="380,128,407,161" onmouseover="hover(0,4)" onmouseout="leave(0,4)" alt="" /> 312,122,28,7!<area shape="rect" coords="312,122,339,128" onmouseover="hover(0,3)" onmouseout="leave(0,3)" alt="" /> 244,77,29,52!<area shape="rect" coords="244,77,272,128" onmouseover="hover(0,2)" onmouseout="leave(0,2)" alt="" /> 177,39,28,90!<area shape="rect" coords="177,39,204,128" onmouseover="hover(0,1)" onmouseout="leave(0,1)" alt="" /> 109,126,28,3!<area shape="rect" coords="109,126,136,128" onmouseover="hover(0,0)" onmouseout="leave(0,0)" alt="" /> ? ui_hotspot_get(hs,314,124) = <area shape="rect" coords="312,122,339,128" onmouseover="hover(0,3)" onmouseout="leave(0,3)" alt="" />
See Also