1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<script type="text/javascript">
<xsl:comment><![CDATA[
var monImage = new Image();
var maLimite;
monImage.src =']]><xsl:value-of select="VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='VIG']/CheminAcces/business_data"/><![CDATA[';
var maLargeur = monImage.width;
alert(maLargeur);
if (maLargeur > 100)
{
maLimite = 'O';
}
else
{
maLimite = 'N';
}
alert(maLimite);
]]>
</xsl:comment>
</script>
<xsl:variable name="Limite">maLimite</xsl:variable>
<xsl:choose>
<xsl:when test="$Limite = 'O'">
<img alt="" border="0" width="100px">
<xsl:choose>
<xsl:when test="normalize-space(VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='VIG']/CheminAcces/business_data)!=''">
<xsl:attribute name="src">
<xsl:value-of select="VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='VIG']/CheminAcces/business_data"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="src">
<xsl:value-of select="VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='PHR']/CheminAcces/business_data"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</img>
</xsl:when>
<xsl:otherwise>
<img alt="" border="0">
<xsl:choose>
<xsl:when test="normalize-space(VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='VIG']/CheminAcces/business_data)!=''">
<xsl:attribute name="src">
<xsl:value-of select="VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='VIG']/CheminAcces/business_data"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="src">
<xsl:value-of select="VueMedia/JMediaView/JMediaViewRow[Typmed/business_data='PHR']/CheminAcces/business_data"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</img>
</xsl:otherwise>
</xsl:choose> |
Partager