1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Create a Direct to Ebay Search Box in Your Website?

Discussion in 'White Hat SEO' started by john14809, Mar 22, 2009.

  1. john14809

    john14809 Junior Member

    Joined:
    Jan 3, 2008
    Messages:
    140
    Likes Received:
    77
    Hey guys,

    I'm trying to create a simple ebay search box in my html website that goes directly to ebay and passes along my ebay campaign id. I am aware there are ebay feeds that have the search bar functionality but they display it directly on your site. Because of the way my site is coded the search on my site needs to go directly to ebay.

    Yesterday I searched a bunch of places but couldn't find what I was looking for. The closest to what I need is found here:

    Code:
    http://www.askdavetaylor.com/ebay_search_box_search_titles_descriptions.html
    The only big problem with the above is it does not pass along the ebay campaign id.

    Thanks in advance.
     
    Last edited: Mar 22, 2009
  2. john14809

    john14809 Junior Member

    Joined:
    Jan 3, 2008
    Messages:
    140
    Likes Received:
    77
    I may have found a solution after extensive google searching. The search bar works but not entirely sure if the campaign id will pass through. So what I did was use a campaign id I never used before and clicked on the search bar a few times and will see tomorrow morning if it works or not.

    Here is the code I'm working with. Change xxxxxxxxxx to your campaign id.

    Code:
    <FONT style="BACKGROUND-COLOR:#FFFFFF"> 
      
    <script language="JavaScript1.1"> 
    <!--  
    function redirectEnter(form){ 
     var eBayURL =  
     
    "http://rover.ebay.com/rover/1/711-53200-19255-0/1?type=3&campid=xxxxxxxxxx&toolid=10001&customid="; 
     for (var i=0;i<form.elements.length;i++){ 
      var e = form.elements[i]; 
      if ((e.name === "query")){ 
       eBayURL += "&ext" + "=" + e.value + "&satitle" + "=" + e.value; 
      } 
     } 
     parent.location = eBayURL; 
    } 
    // --> 
    </script> 
    <table width="70%" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
        <td><a  href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?type=1&campid=xxxxxxxxxx&toolid=10001&customid=" target="_blank"> 
          <table border="0" cellpadding="0" cellspacing="0" height="46"> 
            <form action="http://search.ebay.com/search/search.dll" onsubmit="redirectEnter(this);  
     
    return false;" method="get"> 
              <tr> 
                <td width="95%"> 
                  <input type="text" name="query" style="width:98%" maxlength="100" value=""></td> 
                <td align=right> 
                  <input type="submit" value="Search" name="submit"> 
                </td> 
              </tr> 
            </form> 
          </table> 
        </td> 
      </tr> 
    </table> 
    </FONT>