Hi I have the following code that I'm experimenting with...
The error I'm getting is Object Expected and points to the line.... alert(mnem);
I can't figure out what I'm missing?
Basically I'm trying to port a function I had in vb6 to a web app.
Thanks
I've not failed! Just found 100 ways that don't work...yet!
Code:
<html>
<head>
<script type="text/javascript">
function disp_mnemonic(mtxt)
var tl= len(mtxt)
var x = 1
var mnem = ""
for (x=1;x<=tl;x++)
{
switch (mid(mtxt,x,1)
{
case 'A';
mnem = mnem+ 'A - Alfa' + '\n'
break;
case 'B';
mnem = mnem+ 'B - Bravo' + '\n'
break;
case 'C';
mnem = mnem+ 'C - Charley' + '\n'
break;
case 'D';
mnem = mnem+ 'D - Delta' + '\n'
break;
case 'E';
mnem = mnem+ 'E - Echo' + '\n'
break;
....
case 'Z';
mnem = mnem+ 'Z - Zulu' + '\n'
break;
}
}
{
alert(mnem);
}
</script>
</head>
<body>
<% RPwd="RS56QT" %>
<input type="button" onclick="disp_mnemonic('<%=RPwd%>')" value="Display mnemonic box" />
</body>
</html>
The error I'm getting is Object Expected and points to the line.... alert(mnem);
I can't figure out what I'm missing?
Basically I'm trying to port a function I had in vb6 to a web app.
Thanks
I've not failed! Just found 100 ways that don't work...yet!