chocoboy |
t'as essayé de mettre :
<script src="mainscript.js" />
dans la partie HTML générée de ton XSL : après, dans le fichier mainsccript.js, tu ne te soucies plus de ces problèmes de conversion.
Si tu ne peux pas l'externaliser, voici un exemple contenant des & qui fonctionne dans un XSL :
Code :
- <script src="mainscript.js" />
- <script language="javascript">
- <![CDATA[
- function forum_open(link_forum, id_entity, title, ellipse_top, ellipse_bottom, rectangle_top, rectangle_bottom, back_color, entity, screen_width)
- {
- var dest='forum_open.html?id_forum='+link_forum+'&id_entity='+id_entity+'&title='+title+'&ellipse_top='+ellipse_top+'&ellipse_bottom='+ellipse_bottom+'&rectangle_top='+rectangle_top+'&rectangle_bottom='+rectangle_bottom+'&back='+back_color+'&entity='+entity+'&screen_width='+screen_width;
- window.open(dest, "", "toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width=]]><xsl:value-of select="600*$screen_width div 1600" /><![CDATA[, height=]]><xsl:value-of select="800*$screen_width div 1600" /><![CDATA[, left=]]><xsl:value-of select="($screen_width+(-600*$screen_width div 1600))div 2" /><![CDATA[, top=]]><xsl:value-of select="($screen_height+(-800*$screen_height div 1200))div 2" /><![CDATA[" );
- }
- function popup_open(id_entity, img_path_type, img_src, img_format, img_name, ellipse_top, url_static_jpg, url_static_png, url_photo, screen_width)
- {
- var dest='popup_open.html?id_entity='+id_entity+'&path_type='+img_path_type+'&src='+img_src+'&format='+img_format+'&name='+img_name+'&ellipse_top='+ellipse_top+'&url_static_jpg='+url_static_jpg+'&url_static_png='+url_static_png+'&url_photo='+url_photo+'&screen_width='+screen_width;
- if (img_format=='italian')
- {
- window.open(dest, "", "toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no, width=]]><xsl:value-of select="800*$screen_width div 1600" /><![CDATA[, height=]]><xsl:value-of select="600*$screen_width div 1600" /><![CDATA[, left=]]><xsl:value-of select="($screen_width+(-800*$screen_width div 1600))div 2" /><![CDATA[, top=]]><xsl:value-of select="($screen_height+(-600*$screen_height div 1200))div 2" /><![CDATA[" );
- }
- else if (img_format=='french')
- {
- window.open(dest, "", "toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no, width=]]><xsl:value-of select="600*$screen_width div 1600" /><![CDATA[, height=]]><xsl:value-of select="800*$screen_width div 1600" /><![CDATA[, left=]]><xsl:value-of select="($screen_width+(-600*$screen_width div 1600))div 2" /><![CDATA[, top=]]><xsl:value-of select="($screen_height+(-800*$screen_height div 1200))div 2" /><![CDATA[" );
- }
- else if (img_format=='square')
- {
- window.open(dest, "", "toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no, width=]]><xsl:value-of select="800*$screen_width div 1600" /><![CDATA[, height=]]><xsl:value-of select="800*$screen_width div 1600" /><![CDATA[, left=]]><xsl:value-of select="($screen_width+(-800*$screen_width div 1600))div 2" /><![CDATA[, top=]]><xsl:value-of select="($screen_height+(-800*$screen_height div 1200))div 2" /><![CDATA[" );
- }
- }
- ]]>
- </script>
|
|