%let name=onmouseover; filename odsout '.'; /* http://www.irt.org/script/118.htm */ proc sql; create table coindata as select unique state from maps.us; quit; run; data coindata; set coindata; st=fipstate(state); statename=fipnamel(state); drillurl='http://www.usmint.gov/mint_programs/50sq_program/states/index.cfm?state='||trim(left(st)); picurl='http://www.usmint.gov/images/mint_programs/50sq_program/states/'||st||'_winner.gif'; mouseovercmd="MakeAnotherWindow('http://www.usmint.gov/images/mint_programs/50sq_program/states/"||trim(left(st))||"_winner.gif',230,230)"; length rollover $300.; rollover='href='||drillurl|| ' alt='||quote(trim(left(statename)))|| ' onMouseOver='||quote(mouseovercmd) ; run; goptions device=png; ods listing close; ODS HTML path=odsout body="&name..htm" (title="onmouseover example" no_bottom_matter) style=minimal; goptions gunit=pct ftitle="arial/bold" ftext="arial" htitle=4 htext=3; title "Mouse Over States to see State Quarter!"; title2 "(if your popups are disabled, use 'Ctrl+mouseover')"; footnote 'OnMouseOver calling custom javascript function in a SAS/Graph gmap'; pattern v=solid color=cx43a2ca; proc gmap data=coindata map=maps.us (where=(state ^= stfips('PR'))); id state; choro state / levels=1 nolegend coutline=black html=rollover des='' name="&name"; run; quit; ods html close; filename foo "&name..htm" mod; DATA _NULL_; file foo; put ''; put ''; put ''; RUN; ods html close;