If I understand your question correctly, you want to add XSL variables in your JavaScript at the time the document loads. You would do that by inserting the variable directly into the JavaScript as it is being generated by the XSL. Say you are wanting to populate a choice box with the results of an XSL:for-each statement, you would insert the statment directly into the script and the browser, IE5+, or processor would evaluate those statements when the document loads. You do have to be careful trying to use XSL in your scripts where you try to assign values to objects that would require a "" around the value. You may have to use escape characters to get the referrence correct.
Hope this helps.
Hi, I have a question that follows on from this thread. Above GiffordS wrote....
You do have to be careful trying to use XSL in your scripts where you try to assign values to objects that would require a "" around the value. You may have to use escape characters to get the referrence correct.
If I want to place the CheckName variable into the name and the CheckValue into the value field of my checkbox, how do I use escape characters in this instance???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.