[Sorry to Mike for the double mail, I forget the list as CC]

It doesn't work with onclick either.

Maybe it is because my onclick is an attribute of a <p> tag instead of a input tag?


Le 13-juil.-07 à 14:47, Mike Adair a écrit :


That looks like it should work. Maybe try using onclick instead of onClick?

Mike

Grégory Babusiaux wrote:

HI,

i got a problem with acceding to setHidden function which is in the file OwsContext.js

I tried to acceed it via my own Model, with the targetModel tag.

here is my config.xml extract:

<models>
     <OwsContext id="mainMap">
       <defaultModelUrl>Belgium/belgiumContext.xml</defaultModelUrl>
       <widgets>
         <MapPaneOL id="mainMapWidget">
           <htmlTagId>mainMapPane</htmlTagId>
           <mapContainerId>mainMapContainer</mapContainerId>
         </MapPaneOL>
         <Legend id="contextLegend">
           <htmlTagId>legend</htmlTagId>
           <stylesheet>./Legend2.xsl</stylesheet>
         </Legend>
       </widgets>
       <tools>
         <AoiMouseHandler id="mainAoi"/>
         <DragPanHandler id="mainDragPan">
           <enabled>false</enabled>
         </DragPanHandler>
       </tools>
     </OwsContext>
     <Model id="dataRep">       MY MODEL
       <defaultModelUrl>./arbre/data.xml</defaultModelUrl>
       <widgets>
       <Widget id="dataTree">
         <htmlTagId>data</htmlTagId>
         <stylesheet>./arbre/data.xsl</stylesheet>
         <targetModel>mainMap</targetModel>  TARGETMODEL
       </Widget>
       </widgets>
     </Model>
   </models>

here is the xsl file through wich i tried to get an access:


<xsl:param name="targetModel"/>

<xsl:param name="target">config.object.<xsl:value-of select="$targetModel"/></xsl:param> TARGET MODEL IS GOOD: config.objects.mainMap


<xsl:template match="/data">
<div><h1>
[Données]
</h1>
<span>
<xsl:attribute name="onClick">
<xsl:value-of select="$target"/>.setHidden('belgium','0');
</xsl:attribute>
Hello
</span>
<xsl:apply-templates/>
</div>
</xsl:template>

in Legend2.xsl, an access is made with config.objects.mainMap.setHidden and it works!

In my xsl file it doesn't enter the function.

The function setHidden is now set to a simple alert message so it should at least display :S

any idea?

thanks

greg





--------------------------------------------------------------------- ----
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel







-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to