Welcome guest, is this your first visit? Create Account now to join.
Results 1 to 5 of 5

This is a discussion on Only2Clicks Search Box within the General Chat section, part of the Chrome Forum News category: I recently started using Only2Clicks and I like the search box feature . And I want a search box for ...


  1. #1
    ducktape is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    213

    Default Only2Clicks Search Box

    I recently started using Only2Clicks and I like the search box feature. And I want a search box for Ninja Words. I need help with that because when you search that url doesn't change but still stays http://ninjawords.com/. So can someone help me make a search box if it is even possible. Here's something that might help.
    Last edited by ducktape; 06-21-2009 at 09:50 PM.

  2. #2
    devilslackey is offline Moderator
    Join Date
    May 2009
    Location
    Orange County
    Posts
    330

    Default

    I don't use Only2Clicks but try this for the search code:

    Code:
    <form action="http://ninjawords.com/" method="get" name="search_form" target="_blank">
    <input name="q" id="search-terms" type="text"  value="" onClick="this.focus();this.select();"/>
       <input name="" type="submit" value="Go" style="width: 40px;"/>
      </form>
    And obviously this for the URL: http://ninjawords.com/

    You'd have to create/upload your own image for it since they don't use an image as the logo apparently. I would recommend maybe screenshotting the logo, crop it down and save it. Then upload it.

    There might be a better way to code the search engine but I tried that one several times and it works.
    Last edited by devilslackey; 06-21-2009 at 10:55 PM.

  3. #3
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Well, ninjawords seems to use an AJAX request, making it quite impossible to add a simple search bar for it without some sort of autolookup request you can do that will make it display on that page.

    That being said, there is one!
    You can just do http://ninjawords.com/test and it will look up test.
    So the only way I can think to do this for only2clicks is replacing the code with:
    Code:
    <form method="get" onsubmit="location.href='http://ninjawords.com/'+escape(this.q.value).replace(/%20/g,'+'); return false;">
    <input type="text" name="q" title="Ninja Words" value="" onclick="this.focus();this.select()"/>
    <input name="btnG" type="button" type="submit" style="width:30px"/>
    </form>
    Granted thats just made from my looking at this image, I couldn't be bothered to make an account.
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

  4. #4
    devilslackey is offline Moderator
    Join Date
    May 2009
    Location
    Orange County
    Posts
    330

    Default

    The one I posted worked just fine. I even loaded up Only2Clicks to test it. Although changing the width to 40px makes the "Go" button not look so weird. I took out some of the bloat and edited my original post. Although yours works just as well

    Looking at yours, you have type="button" followed by type="submit" and it has a blank button to click on for searching. Should I assume it should read: type="submit" followed by value="Go" ?
    Last edited by devilslackey; 06-21-2009 at 11:01 PM.

  5. #5
    ducktape is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    213

    Default

    Quote Originally Posted by devilslackey View Post
    You'd have to create/upload your own image for it since they don't use an image as the logo apparently. I would recommend maybe screenshotting the logo, crop it down and save it. Then upload it.
    Thanks People I got it working now, and instead of going through all that trouble I just used this for the image.

Posting Permissions

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