amMap support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash amMap: Help


  • Index
  •  » Help
  •  » Calling javascript functions ?

#1 2008-05-20 14:20:47

vpraveen84
New member

Calling javascript functions ?

Is it possible to call javascript functions defined in a js file from <area>, <movie>, etc ? If so, how do I do this ?

Offline

 

#2 2008-05-21 00:29:15

marcelionis
Administrator

Re: Calling javascript functions ?

yes, you can do this. add js function to url attribute:

<area url="javascript:alert('something')" .....>

this will work only on a web server.

Offline

 

#3 2008-05-21 00:37:33

vpraveen84
New member

Re: Calling javascript functions ?

this works fine for me, but i'm trying to get something like <area url= "javascript:function smth{ //code here };" > to work.
Would something like this be possible ?
Would I be able to call user-defined function defined in another js file ?
Would I be able to use ajax in the javascript code here ?

Offline

 

#4 2008-05-21 12:00:58

marcelionis
Administrator

Re: Calling javascript functions ?

I am afraid this will not work. You should do the following:

<area url= "javascript:someFunction();" >

and then add this function in your html.

Offline

 

#5 2012-06-08 03:42:47

qemm
Administrator

Re: Calling javascript functions ?

Are you running the page with a map locally? (file:///) Due to Flash security restrictions links (and JavaScript integration) does not work for locally maps. You need to load it through web server.

Offline

 
  • Index
  •  » Help
  •  » Calling javascript functions ?

© amMap & amCharts | Forum engine: PunBB