|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Pass XSL Attribute into Javascipt Function
I need to pass the value of {@dir} into a javascript function. Has anyone done this before?
Code:
<xsl:if test="@position = $maxpages">
<script language="JavaScript">SCOSetStatusComplete({@dir}); //Call API adapter to Set SCO Status Complete;</script>
</xsl:if>
__________________
mr... mike.rusaw@realpage.com RalPage, Inc. "I have made this letter longer than usual, only because I have not had the time to make it shorter." - Blaise Paschal |
|
#2
|
|||
|
|||
|
That should work fine. What problem are you having?
|
|
#3
|
||||
|
||||
|
I get an IE error that "Conditional compilation is turned off"
|
|
#4
|
||||
|
||||
|
When i just put a string value into the function it works fine. The XSL variable throws the error.
This one is killing me! |
|
#5
|
||||
|
||||
|
Ok I got it!
I adjust my script call to look like: Code:
<script language="JavaScript">SCOSetStatusComplete(' <xsl:value-of select="@dir" /> '); //Call API adapter to Set SCO Status Complete;</script>
It now works... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Pass XSL Attribute into Javascipt Function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|