In the following page I want to handle the selected value of the select
element:
<html>
<head>
<title>Select example</title>
<script language="Javascript1.1" src="/SrcDC/_Gen/dynapi.js"></script>
<script language="Javascript1.1">
DynAPI.setLibraryPath('/SrcDC/_Gen/')
DynAPI.include('dynacore.api.*')
DynAPI.include('dynacore.ext.inline')
DynAPI.onLoad=function() {
}
</script>
<script language="Javascript">
function DoOnChangeLang(){
alert(DynAPI.document.elements["selLang"]); // undefined!!
alert(DynAPI.document.getElementById('selLang').options.item(0).value); //
undefined!!
// alert(document.all['selLang'].options.item(0).value); // works only
in IE
// alert(frmMain.selLang.options.item(0).value); } // works only
in IE
</script>
</head>
<body>
<form id="frmMain">
<p>Language:<select id="selLang" onchange="DoOnChangeLang()"><option
value="Gr">Greek<option value="En">English</select></p>
</form>
</body>
</html>
How I can do this? Do you have any idea?
What is your approach to similar tasks?
Thanks
Andreas
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help