Thorsten Scherler-3 wrote:
>
>
> Hmm, I have to admit I did not understand. As I understand the above
> code the 2 alerts should be always the same, right?
>
Both should show the same alert, but not so.
I try do that, and this is the result, root es : /pub-id/area/ , root2 es:
pub-id/area and hack: pub-id/area
var root2='<xsl:value-of select="$root"/>';
var root='<xsl:value-of select="$root"/>';
function obtener_comarcas(nomSupra){
alert('root es :' +root);
alert('root2 es :' +root2);
alert('hack: <xsl:value-of select="concat($publication-id, '/',
$area)"/>');
}
<![CDATA[
Perhaps there is a problem to put the same variable name of the xsl and
javascript.
Thank Thor.
Meaning the expected behavior is root=root2.
So the error you see is the trailing slash on the end with alert('root
en metodo: '+root);, right? I mean expected is '/pub-id/area' but it
shows '/pub-id/area/'.
Hmm, weird. Try the following for debug without the surrounding CDATA:
function prueba(){
alert('hack: <xsl:value-of select="concat($publication-id, '/',
$area)"/>');
alert('root en metodo: '+root);
> you have any idea why this happens, thanks.
Not really, really strange, are you sure that in between the call you
are not adding a '/' somewhere which does not explain why the second
call does not contain it anymore.
salu2
--
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>
Sociedad Andaluza para el Desarrollo de la Sociedad
de la Información, S.A.U. (SADESI)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
View this message in context:
http://www.nabble.com/parameter-passed-to-javascript-in-a-xsl-tp24642045p24643132.html
Sent from the Lenya - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]