I have a page with a search form, and when submitted, the form action is set to an iframe on the same page.
The iframe displays the search-results. THEN, w开发者_如何学JAVAhen clicking on a result, a new page opens displaying it. However, when hitting back from the displayed page, the iframe is closed, and it is as if no search was made at all.
Is this something which happens with iframes in IE?
Thanks
You can fix this as mentioned in the awnser from Moin.
Here is some javascript that will help with this problem:
<script type="text/javascript" language="javascript">
document.getElementById("YourControlName").focus();
</script>
</body>
Or JQuery
$("#selector").focus();
set focus to an element on the page, thus removing focus from the iframe.
Or set focus to the frame if you want the back button to work within the iframe.
精彩评论