xsl variable in javascript einbinden

banjo1

Grünschnabel
Hallo Ich hab ein ähnliches Problem wie Jah. Ich möchte auch eine variable aus xsl in eine javascript syntax einbauen nur wie Sollte doch gehen? Bitte um Hilfe!

In rot die Variable in xsl und die JavaScriptzeile die noch falsch ist.

Code:
   xsl:when test="/WEB2CAD/@preview">
 		 		 		 	<xsl:if test="@drawing3d=''">
 		 		 		 		<div class="svg_symbolbar" id="svg_symbolbar" style="top: 0px">
 		 		 		 			<table width="660px" cellpadding="0" cellspacing="0" border="0" align="left">
 		 		 		 		 	<tr>
 		 		 		 		 	
 		 		 		 		 	<td width="200">&nbsp;<IMG border="0" src="../common/pic/cart22.gif"/><font face="Arial" size="2">nicht mehr bestellbar</font></td>
   
 		 		 		 		 	<!-- PRODUCT NAME -->
 		 		 		 		 	
 		 		 		 		 	<TD id="space_title" class="title" valign="bottom"><xsl:value-of select="@name"/></TD>
 		 		 		 		 	
 		 		 		 		 	<td></td>
 		 		 		 		 	<td width="20"><A href="javascript:doNothing()"><SPAN id="pan" class="svgbutton"><IMG border="0" src="../common/pic/pan.png"/></SPAN></A></td>
 		 		 		 		 	<td width="20"><A href="javascript:doNothing()"><SPAN id="zoomin" class="svgbutton"><IMG border="0" src="../common/pic/zoomin.png"/></SPAN></A></td>
 		 		 		 		 	<td width="20"><A href="javascript:doNothing()"><SPAN id="zoomout" class="svgbutton"><IMG border="0" src="../common/pic/zoomout.png"/></SPAN></A></td>
 		 		 		 		 	<td width="20"><A href="javascript:doNothing()"><SPAN id="zoominwindow" class="svgbutton"><IMG border="0" src="../common/pic/zoom.png"/></SPAN></A></td>
 		 		 		 		 	<td width="20"><A href="javascript:doNothing()"><SPAN id="showall" class="svgbutton"><IMG border="0" src="../common/pic/selectall.png"/></SPAN></A></td>
 		 		 		 		 	<td width="20"><A href="javascript:doNothing()"><SPAN id="homeview" class="svgbutton"><IMG border="0" src="../common/pic/home.png"/></SPAN></A></td>
 		 		 		 		 	</tr>
 		 		 		 			</table>
 		 		 		 		</div>
 		 		 		 	</xsl:if>
 		 		 		 </xsl:when>
 		 		 		 <xsl:otherwise>
 		 		 		 	<script language="JavaScript">
 		 		 		 		<xsl:comment>
 		 		 		 		<xsl:choose>
 		 		 		 			<xsl:when test="@drawing3d!=''">
 		 		 		 			 <![CDATA[
 		 		 		 			 document.writeln('<div class="svg_symbolbar" id="svg_symbolbar" style="top: -40px">');
 		 		 		 			 ]]>
 		 		 		 		 </xsl:when>
 		 		 		 		 <xsl:otherwise>
 		 		 		 			 <![CDATA[
 		 		 		 			 document.writeln('<div class="svg_symbolbar" id="svg_symbolbar" style="top: 0px">');
 		 		 		 			 ]]>
 		 		 		 		 </xsl:otherwise>	 		 		 		
 		 		 		 	 </xsl:choose>	 		 		 		
 		 		 		 	 <![CDATA[
 		 		 		 	 document.writeln('<table width="660px" cellpadding="0" cellspacing="0" align="left">');
 		 		 		 	 document.writeln('<tr>');
 		 		 		 		document.writeln('<td width="200">&nbsp;<IMG border="0" src="../common/pic/cart22.gif"/><font face="Arial" size="2">nicht mehr bestellbar</font></td>'); 		 		 	 
 		 		 		 		document.writeln('<td id="space_assembly" class="title" valign="bottom">' + name + '></td>'); 		 		 			
 		 		 		 	 document.writeln('<td></td>');
 		 		 		 	 document.writeln('<td width="20"><A onmousedown="toolBar(\'pan\')" href="javascript:doNothing()"><SPAN id="pan" class="svgbutton"><IMG border="0" src="../common/pic/pan.png" alt="' + strPan + '"/></SPAN></A></td>\n');
  				  			  document.writeln('<td width="20"><A onmousedown="toolBar(\'zoomIn\')" href="javascript:doNothing()"><SPAN id="zoomin" class="svgbutton"><IMG border="0" src="../common/pic/zoomin.png" alt="' + strZoomIn + '"/></SPAN></A></td>\n');
  				  			  document.writeln('<td width="20"><A onmousedown="toolBar(\'zoomOutA\')" onmouseup="toolBar(\'zoomOutE\')" href="javascript:doNothing()"><SPAN id="zoomout" class="svgbutton"><IMG border="0" src="../common/pic/zoomout.png" alt="' + strZoomOut + '"/></SPAN></A></td>\n');
  				  			  document.writeln('<td width="20"><A onmousedown="toolBar(\'zoomInWindow\')" href="javascript:doNothing()"><SPAN id="zoominwindow" class="svgbutton"><IMG border="0" src="../common/pic/zoom.png" alt="' + strZoomWindow + '"/></SPAN></A></td>\n');
  				  			  document.writeln('<td width="20"><A onmousedown="toolBar(\'showAllHotspots\')" onmouseup="toolBar(\'hideAllHotspots\')" href="javascript:doNothing()"><SPAN id="showall" class="svgbutton"><IMG border="0" src="../common/pic/selectall.png" alt="' + strShowHotspots + '"/></SPAN></A></td>\n');
  				  			  document.writeln('<td width="20"><A onmousedown="toolBar(\'homeViewA\')" onmouseup="toolBar(\'homeViewE\')" href="javascript:doNothing()"><SPAN id="homeview" class="svgbutton"><IMG border="0" src="../common/pic/home.png" alt="' + strHomeView + '"/></SPAN></A></td>\n');
 		 		 		 		document.writeln('</tr>');
 		 		 		 	 document.writeln('</table>');
 		 		 		 	 document.writeln('</div>');
 		 		 		 	 ]]>
 		 		 		 	//</xsl:comment>
 		 		 		 	</script>	 		 			
 		 		 		 </xsl:otherwise>
 		 		 		</xsl:choose>
 		 		 	</xsl:if>
 

Neue Beiträge

Zurück