This happens only in Internet Explorer. I have two input search boxes one is Google site search and other is the other box wikipedia.
If I put some text on search box "Sitede Ara" (Google site search) and hit return key then two window opens (Google & Wikipedia, how to resolve this conflict. I know it's because Wikipedia scripts' key event litener but if I remove it then return key won't work for Wikipedia box. I prefered this Wikipedia script because unicode chars like ş,ğ can pass through it.
Example page:
http://www.aymavisi.org/hikaye/Dostu...%20Cibran.html
Google site search code:
Code:<form id="searchbox_007319955694884483973:pnnwgtpio7g0" action="http://www.google.com/search" style="line-height: 100%; font-size:10pt; font-family:Times New Roman; background-color:#444577 ; text-align:center" target="_blank"> <font size="3" face="Tahoma"> <input type="hidden" name="cof0" value="FORID:0" /> <input type="hidden" name="cx0" value="007319955694884483973:pnnwgtpio7g" /> </font> <div style="padding-top: 2px"> <font size="3"> <input name="q" size="16" value=" " style="font-family:Tahoma; text-align:center; vertical-align:middle" /></font><span style="font-size: 7pt"><font size="3"><input type="submit" name="sa" value="Sitede Ara" style="font-family:Tahoma; width:75; height:18; vertical-align:middle" /></font></span></div> </p> <font size="3" face="Tahoma"> <input type="hidden" name="cx" value="007319955694884483973:pnnwgtpio7g" /> <input type="hidden" name="cof" value="FORID:0" /> </font> </form>
----------------------------------------------------------------
Wikipedia script code:
Code:<script language="JavaScript" type="text/javascript"> document.onkeydown = function(ev) { var key; ev = ev || event; key = ev.keyCode; if (key == 13) { search_google(); } } function search_google(){ window.open("http://tr.wikipedia.org/wiki/"+document.search.query.value); } </script> <form name="search" style="text-align: center; background-color:#444577"> <div style="padding-top: 2px"> <input type="text" name="query" value="" style="font-family: Tahoma; font-size: 10pt; vertical-align:middle; text-align:center" size="16"><input type="button" value="Sözlük" onClick="search_google()" style="font-family: Tahoma; font-size: 10pt; vertical-align:middle; height:18"> </div> </form>



Reply With Quote
Bookmarks