indupriya9
Programmer
I have a vbscript code that works fine in IE for passing the values between two windows.
But I had to make this application comaptible with FF where vbscript doesn't work.
So I modified the above code as this, but it does not work. There must be syntax error somewhere.
When I see the source via html both look the same as follows:
<script language='vbscript'>
function selected(strId,strDesc)
window.opener.frm.domain0.value=strId
window.opener.domain__Display0.innertext=strDesc
window.close
end function
</script>
<script language='javascript'>
function selected(strId,strDesc)
{
window.opener.frm.domain0.value=strId
window.opener.domain__Display0.innertext=strDesc
window.close
}
</script>
But now when I use the javascript I get a 404 error on the second window instead. Any ideas why my javascript code is not working?
Thanks
ip
Code:
<script language='vbscript'>
function selected(strId,strDesc)
window.opener.frm.<% =request("retobj")%><%=request("idx")%>.value=strId
window.opener.<%=request("retobj")%>__Display<%=request("idx")%>.innertext=strDesc
window.close
end function
</script>
But I had to make this application comaptible with FF where vbscript doesn't work.
So I modified the above code as this, but it does not work. There must be syntax error somewhere.
Code:
dim ret
dim idy
ret=request("retobj")
idy=request("idx")
<script language='javascript'>
function selected(strId,strDesc)
{
window.opener.frm.<%=ret %><%=idy %>.value=strId
window.opener.+<%=ret%>__Display<%=idy%>.innertext=strDesc
window.close
}
</script>
When I see the source via html both look the same as follows:
<script language='vbscript'>
function selected(strId,strDesc)
window.opener.frm.domain0.value=strId
window.opener.domain__Display0.innertext=strDesc
window.close
end function
</script>
<script language='javascript'>
function selected(strId,strDesc)
{
window.opener.frm.domain0.value=strId
window.opener.domain__Display0.innertext=strDesc
window.close
}
</script>
But now when I use the javascript I get a 404 error on the second window instead. Any ideas why my javascript code is not working?
Thanks
ip