Advanced Search

Results 1 to 2 of 2

Thread: Two search box return key conflict

  1. #1
    Join Date
    Sep 2008
    Posts
    18
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Two search box return key conflict

    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>

  2. #2
    Join Date
    Sep 2008
    Posts
    18
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    In short with IExplorer go to page http://www.aymavisi.org/hikaye/Dostu...%20Cibran.html and type something in search box Sitede Ara and hit enter key, you'll see two windows open. How to fix it?

Similar Threads

  1. Resolved return
    By ggalan in forum PHP
    Replies: 2
    Last Post: 05-03-2011, 09:23 PM
  2. Replies: 0
    Last Post: 12-28-2009, 08:14 AM
  3. How to get return value in Javascript
    By Ugat in forum JavaScript
    Replies: 1
    Last Post: 04-15-2009, 08:44 AM
  4. Replies: 0
    Last Post: 04-06-2008, 07:57 PM
  5. Building a simple mysql search and return in dreamweaver cs3
    By revray in forum MySQL and other databases
    Replies: 0
    Last Post: 02-08-2008, 12:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •