I am using xml to get {@id}, and xsl to display a page.
<select name="zx" id="zx" onchange="JAVASCRIPT:showField('zx')">
The above works in my function. The following doesn't
<select name="{@id}" id="{@id}" onchange="JAVASCRIPT:showField({@id})">
How can I pass {@id} in single quotations as the parameter in the showField function.
in other words. JAVASCRIPT:showField('{@id}')
Is this possible?
Fyi, function is as follows:
function showField(fred)
{
var lSelectBox = 'document.compslist.' + fred +'.value'
var lBox = eval(lSelectBox);
alert(lBox) //The idea is to show the selected value in an alert box
}
<select name="zx" id="zx" onchange="JAVASCRIPT:showField('zx')">
The above works in my function. The following doesn't
<select name="{@id}" id="{@id}" onchange="JAVASCRIPT:showField({@id})">
How can I pass {@id} in single quotations as the parameter in the showField function.
in other words. JAVASCRIPT:showField('{@id}')
Is this possible?
Fyi, function is as follows:
function showField(fred)
{
var lSelectBox = 'document.compslist.' + fred +'.value'
var lBox = eval(lSelectBox);
alert(lBox) //The idea is to show the selected value in an alert box
}