[Qgis-user] qgis , html & css

Andreas Neumann a.neumann at carto.net
Wed Oct 24 08:01:49 PDT 2012


 Hi Andrea,

 In what context are you executing this javascript? QGIS Desktop, QGIS 
 Webclient?

 In what component?

 I haven't heard that QGIS Desktop can run Javascript. The only part 
 where it could potentially run javascript is Webkit, which is used in 
 print composer and tooltips.

 So please better explain what you are doing.

 Andreas

 On Wed, 24 Oct 2012 16:25:05 +0200, Andrea Peri wrote:
> Hi,
> I see actually qgis will support javascript and some css,
> but it don't execute correctly this code:
>
>  var pixel_i = 500;
>  var pixel_j = 340;
>
>  {
>  alert('eseguo codice js');
>  with(document.getElementById('marker'))
>  {
>  alert('eseguo altro codice js');
>  style.left = pixel_i;
>  style.top = pixel_j;
>  style.display = 'block';
>  }
>  };
>
> The goal of this javascrirpt code is move the marker image on the map
> image.
> QGIS windows run the two alert, so I understand that the javascirpt
> code are running, but the marker.gif is not moved.
>
> I dn't know if this is a bug for qgis.
>
> This code work well on a browser web like firefox.
>
> Thx,

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland



More information about the Qgis-user mailing list