I have to move focus to parent frame using JAVASCRIPT:focus().
The thing is that text field lost focus still got cursor in it and editable.
Is there any way to fix this?
※ the issue occurs under IE6. (IE8 works great as I intended.)
Here’s source,
//— 1.html
<iframe src="2.html"></iframe>
<form name="frmMain">
<input type="button" name="btnConfirm" value="CONFIRM" />
</form>
//— 2.html
<head>
<script language="javascript">
function test() {
keynum = event.keyCode;
if (keynum == 9 || keynum == 13)
parent.frmMain.btnConfirm.focus();
}
</script>
</head>
<body>
<input type="text" onKeyDown="test()" />
<input type="text" value="dummy" />
You can try adding
.blur()to the input before the setting the new.focus()