Check this http://javascript.internet.com/forms/multiple-search-engine.html page. I wonder how to open search result in new window which works for Internet Explorer. Also, how to set body onload for the searchbox. Please help me. This third times i asked but there's no expert able to solve this. Before this, an expert was sent a solution but it works just for mozilla only. Help me. TQ.
views:
155answers:
2
+1
A:
I haven't delved into your code deeply, but try changing
<form name="searchForm">
into
<form name="searchForm" target="_blank">
that should open it in a new window.
Pekka
2010-02-20 13:02:08
still not works.. :(
Heypy.com
2010-02-20 13:31:54
Can you show a live example?
Pekka
2010-02-20 13:34:02
this is http://javascript.internet.com/forms/multiple-search-engine.html live example.
Heypy.com
2010-02-22 11:42:41
@Heypy that is the variant that doesn't do what you want, isn't it? Can you show an example of your approach?
Pekka
2010-02-22 11:52:29
i've got the solution.but i did not want to open in new customized window coz it has problem with pop-up blocker. its there any alternative way?
Heypy.com
2010-02-24 00:54:45
@Heypy probably not without extensively rewriting the Javascript.
Pekka
2010-02-24 08:30:15
i've tried it but both browsers not works for it. please help me. i prefer open result in new tab.
Heypy.com
2010-03-25 13:20:29
@Heypy It's not possible to force the browser to open it in a new tab. `_blank` will open it in a new window or a new tab, depending on the user's settings.
Pekka
2010-03-25 14:19:04
ok, i agree..but still not works for IE..help me out!
Heypy.com
2010-04-03 10:24:24
+3
A:
It seems that in your case the form submits into a new tab instead a new window. The new window can be forced by setting the width and height of the new window, but you must be aware that popup blockers can prevent this action. Also don't forget to set the target attribute to _blank in the form so you can degrade gracefully in browsers with js deactivated.
<script type="text/javascript">
// frm is a reference to the FORM element
function frm_sbmit(frm) {
wnd = window.open("about:blank", "_blank", "width=1024px, height=768px, + put here everithing you want in options for the new window, a good guide is http://www.w3schools.com/jsref/met_win_open.asp");
frm.target = wnd;
frm.submit();
}
</script>
<form action="url" target="_blank" method="post" onsubmit="frm_sbmit(this);return false;">
...
</form>
Rodrigo
2010-02-20 14:05:10