SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: question...

  1. #1
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    question...

    well it's sort of hard for me to phrase the question, but anyways:

    i have a search engine box. what i want to know is where the text entered is added to the code so that the appropriate result is given.

    To make it a bit clearer , for example, I enter the search term 'Sony'. THe search will result in hte preson going to the search results.

    Where woujld I find the place (in the html code)that this code is?

  2. #2
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Totally depends on which search engine script you are using and which language you are using, I would think.

    Glen

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, here's the problem: i want to use this affiliate program (on cj)...but their search box (below)doesn't work, and so i want to insxtead manually add links. Like for example, if there was a movie, ABC, i want to be able to link directly to that movie, with my credit...

    <TABLE>
    <TR>
    <TD>
    <form method="post" name="simpSearch" target="_top" ACTION="http://www.qksrv.net/interactive">
    <input type="hidden" name="bmForm" value="simpSearch">
    <input type="hidden" name="bmFormID" value="983198627398">
    <input type="hidden" name="bmIsForm" value="true">
    <input type="hidden" name="bmPrevTemplate" value="nm/hm/nm.jsp">

    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>path"><input type="hidden" name="SEARCH_INPUT<>path" value="/Assortments/NMPrimary">
    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>objectTypes"><input type="hidden" name="SEARCH_INPUT<>objectTypes" value="PRODUCT">
    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>maxRows_cd"><input type="hidden" name="SEARCH_INPUT<>maxRows_cd" value="1000">
    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>additionalWhere"><input type="hidden" name="SEARCH_INPUT<>additionalWhere" value="">
    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>searchFor"><input type="hidden" name="SEARCH_INPUT<>searchFor">
    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>searchTextOperator"><input type="hidden" name="SEARCH_INPUT<>searchTextOperator">
    <input type="hidden" name="bmHidden" value="SEARCH_INPUT<>additionalWhere"><input type="hidden" name="SEARCH_INPUT<>additionalWhere">

    <input type="hidden" name="bmHidden" value="Monitor_Action"><input type="hidden" name="Monitor_Action" value="SEARCH">
    <input type="hidden" name="bmHidden" value="Monitor_Location"><input type="hidden" name="Monitor_Location" value="Grocery Search">
    <input type="hidden" name="bmHidden" value="ASSORTMENT<>ast_id">
    <input type="hidden" name="ASSORTMENT<>ast_id" value="154621">

    <input type="hidden" name="pid" value="1038004">
    <input type="hidden" name="url" value="http://www.namaste.com/nm/hm/nm.jsp?uid=983198627398&site=NM&language=EN">
    <input type="hidden" name="aid" value="2696813">
    </FORM>

    <form method="post" name="genericSearch" target="_top" action="http://www.namaste.com/nm/hm/nm.jsp?uid=983198627400&site=NM&language=EN">

    <table WIDTH="145" BORDER="0" CELLSPACING="0" CELLPADDING="1" BGCOLOR="#FF9933">
    <tr>
    <td WIDTH="145" ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#FF9933">
    <table WIDTH="145" BORDER="0" CELLSPACING="0" CELLPADDING="1">
    <tr>
    <td WIDTH="145" ALIGN="LEFT" VALIGN="TOP" background="http://www.namaste.com/media/nm/im/bn/modulebkg.gif" BGCOLOR="#FF9933">
    <font FACE="VERDANA, HELVETICA, ARIAL" SIZE="1">
    <b>Search</b></font>
    </td>
    </tr>
    </table>
    <table WIDTH="145" BORDER="0" CELLSPACING="0" CELLPADDING="4">
    <tr>
    <td WIDTH="135" VALIGN="top" ALIGN="LEFT" NOWRAP BGCOLOR="#FEF6E9">
    <font FACE="VERDANA, HELVETICA, ARIAL" SIZE="1">
    <!-- The onlick below is browser specific see details at top of page -->
    <input type="hidden" name="bmText" value="txtSearchFor"><font face="courier new" size="3"><tt>&nbsp;</tt></font><input type="text" name="txtSearchFor" size="10" value="" onclick="return false;">&nbsp;
    <a HREF="http://www.qksrv.net/click-1038004-2696813?URL=javascript%3ApopulateSearchParameters%28%29">
    <img src="http://www.namaste.com/media/nm/im/bt/nm_go_2424.gif" BORDER="0" ALIGN="TOP"><br>
    </a>
    </font>
    </td>
    </tr>
    <tr>
    <td WIDTH="135" VALIGN="top" ALIGN="LEFT" BGCOLOR="#FEF6E9">
    <input type="hidden" name="bmRadio" value="txtsearchTextOperator"><font face="courier new" size="3"><tt>&nbsp;</tt></font><input type="RADIO" name="txtsearchTextOperator" value="and" checked>
    <font FACE="VERDANA, HELVETICA, ARIAL" SIZE="1">Match all words</font>
    <br>
    <input type="hidden" name="bmRadio" value="txtsearchTextOperator"><font face="courier new" size="3"><tt>&nbsp;</tt></font><input type="RADIO" name="txtsearchTextOperator" value="or">
    <font FACE="VERDANA, HELVETICA, ARIAL" SIZE="1">Match any words</font>

    </td>
    </tr>
    <tr>
    <td ALIGN="LEFT" width="135" BGCOLOR="#FEF6E9">
    <input type="hidden" name="bmSingle" value="selCategory"><font face="courier new" size="3"><tt>&nbsp;</tt></font><select name="selCategory">
    <option selected value="none">All Categories


    <option value="AGrocery">Grocery

    <option value="BMusic">Music

    <option value="CDVDs">DVD

    <option value="DPhonecards">Phone Cards

    <option value="EBeautyandFashion">Beauty & Fas...

    <option value="FFineJewelry">Fine Jewelry

    <option value="HArtsandCrafts">Arts & Crafts

    <option value="IHealth">Health

    <option value="KFestivalsandPuja">Festivals & ...

    <option value="LBooks">Books

    <option value="Multimedia">Multimedia

    <option value="UtensilsandAppliances">Utensils & A...

    <option value="ZSpecials">Specials

    </select>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <input type="hidden" name="bmHidden" value="ASSORTMENT<>ast_id">
    <input type="hidden" name="ASSORTMENT<>ast_id" value="154621">
    <input type="hidden" name="bmFields" value="bmForm,bmFormID,bmIsForm,bmPrevTemplate,bmText,bmRadio,bmSingle,bmHidden">
    <input type="hidden" name="bmHash" value="915fe2c838d568b12897341aa4a5f80b2c99a8a6">

    <input type="hidden" name="pid" value="1038004">
    <input type="hidden" name="url" value="http://www.namaste.com/nm/hm/nm.jsp?uid=983198627398&site=NM&language=EN">
    <input type="hidden" name="aid" value="2696813">
    </FORM>
    </TD>
    </TR>
    </TABLE>



    <script LANGUAGE='JavaScript'>

    function populateSearchParameters()
    {
    var pathLocation;
    var pathCategory;
    var searchForLocation;
    var searchTextOperatorLocation;
    var searchAdditionalWhereLocation;
    var searchForValue;
    var theCategory;


    pathLocation=findIndexOf('SEARCH_INPUT<>path');
    searchForLocation=findIndexOf('SEARCH_INPUT<>searchFor');
    searchTextOperatorLocation=findIndexOf('SEARCH_INPUT<>searchTextOperator');
    searchAdditionalWhereLocation = findIndexOf('SEARCH_INPUT<>additionalWhere');
    pathCategory="/Assortments/NMPrimary";

    searchForValue=document.genericSearch.txtSearchFor.value;

    document.simpSearch[searchForLocation].value=searchForValue;
    if (document.genericSearch.txtsearchTextOperator[0].checked==true)
    {
    document.simpSearch[searchTextOperatorLocation].value="and";
    }
    else
    {
    document.simpSearch[searchTextOperatorLocation].value="or";
    }


    document.simpSearch[searchAdditionalWhereLocation].value="(ATR_ENSkuName='"+searchForValue+"' or ATR_ENSkuOps='"+searchForValue+"' or ATR_ENBrandOps='"+searchForValue+"' or ATR_ENAlias='"+searchForValue+"' or ATR_ENAlias2='"+searchForValue+"' /* or ATR_SPAlias='"+searchForValue+"' or ATR_SPAlias2='"+searchForValue+"' */ )";

    theCategory = document.genericSearch.selCategory[document.genericSearch.selCategory.selectedIndex].value;

    // if no category selected
    if(theCategory=="none")
    {
    document.simpSearch[pathLocation].value=pathCategory;
    //alert(document.simpSearch[pathLocation].value);
    document.simpSearch.submit();
    }
    // else swap in the right path
    else
    {
    document.simpSearch[pathLocation].value = pathCategory + "/" + theCategory;
    //alert(document.simpSearch[pathLocation].value);
    document.simpSearch.submit();
    }

    }


    // 11/2/00 Joan added next function to process text link to expand search by matching any word.
    // The previous routine for this href was not working in Netscape.

    function populateSearchParametersMatchAnyWord()
    {
    var pathLocation;
    var pathCategory;
    var searchForLocation;
    var searchTextOperatorLocation;
    var searchAdditionalWhereLocation;
    var searchForValue;
    var theCategory;


    pathLocation=findIndexOf('SEARCH_INPUT<>path');
    searchForLocation=findIndexOf('SEARCH_INPUT<>searchFor');
    searchTextOperatorLocation=findIndexOf('SEARCH_INPUT<>searchTextOperator');
    searchAdditionalWhereLocation = findIndexOf('SEARCH_INPUT<>additionalWhere');
    pathCategory="/Assortments/NMPrimary";

    searchForValue=document.genericSearch.txtSearchFor.value;

    document.simpSearch[searchForLocation].value=searchForValue;
    //if (document.genericSearch.txtsearchTextOperator[0].checked==true)
    // {
    // document.simpSearch[searchTextOperatorLocation].value="and";
    // }
    // else
    // {
    document.simpSearch[searchTextOperatorLocation].value="or";
    // }


    document.simpSearch[searchAdditionalWhereLocation].value="(ATR_ENSkuName='"+searchForValue+"' or ATR_ENSkuOps='"+searchForValue+"' or ATR_ENBrandOps='"+searchForValue+"' or ATR_ENAlias='"+searchForValue+"' or ATR_ENAlias2='"+searchForValue+"' /* or ATR_SPAlias='"+searchForValue+"' or ATR_SPAlias2='"+searchForValue+"' */ )";

    theCategory = document.genericSearch.selCategory[document.genericSearch.selCategory.selectedIndex].value;

    // if no category selected
    if(theCategory=="none")
    {
    document.simpSearch[pathLocation].value=pathCategory;
    //alert(document.simpSearch[pathLocation].value);
    document.simpSearch.submit();
    }
    // else swap in the right path
    else
    {
    document.simpSearch[pathLocation].value = pathCategory + "/" + theCategory;
    //alert(document.simpSearch[pathLocation].value);
    document.simpSearch.submit();
    }

    }
    // down shields! -->


    function findIndexOf(strFieldName)
    // The findIndexOf routine is used to get the index of a field on the page given its name
    // This is used only for fields ehen the field name has a <> in it.
    {
    var formz;
    var z;

    for (formz=0;formz<document.forms.length;formz++){
    for (z=0;z<document.forms[formz].elements.length;z++){
    if(strFieldName.toUpperCase()==document.forms[formz].elements[z].name.toUpperCase())
    {
    //alert("The index of the element is:" + z);
    return z;
    }
    }
    }

    }


    document.genericSearch.action="javascriptopulateSearchParameters()"
    document.genericSearch.method="POST"
    document.genericSearch.txtSearchFor.focus();

    function open_loginwindow(url)
    {
    window.open(url,"login_popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=350,height=350");
    }

    </SCRIPT><img src="http://www.qksrv.net/image-1038004-2696813" width="1" height="1" border="0">


    so does anyone know how to do it?

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    myasia...

    IN the future, would you mind linking to the page with the code instead of posting the whole code in the thread? Thanks.

    Good luck on your problem.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually i wanted to do that...but it's in a cj box, and so it is only shown to the publishers

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah...never mind then. Carry on...
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, so does anyone know how to do it?


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
  •