Query with DSP %loop%

Hi All,

I have created one DSP page and i have an issue that i am not able to access one variable inside the %loop% tag of dsp.

below is my code

function getValues(operation) {
if(operation == ‘FUNCLookup’) {
if (document.propFile.V_ENVNAME.value != ‘default’) {
document.propFile.ENVSelected.value = document.propFile.V_ENVNAME.value;
document.propFile.action.value = “DRpropfileView.dsp”;

		} else {
			document.propFile.action.value = "test.dsp";
Select Environment

%invoke Admin.services:getEnvironment%
%loop Environment%
<OPTION %ifvar WM_LINENAME vequals(ENVSelected)% selected %endif% value="%value WM_LINENAME%">

	%onerror% %include onError.txt% %endinvoke%

Name of this page is test.dsp.
In the option tag i am comparing ENVSelected with WM_LINENAME, If it is equal then the option should be selected.
but the issue is that ENVSelected values is not available inside the %loop% tag. becaiase of this when page reloads value of drop down again sets to default one :cry:

it will be really great if some one can help me with this.

Thanks in Advance.

Mangat Rai