HTML - Help With Search Form
Hey -
I'm trying to fix a piece of code which will allow me to insert a Library Catalogue Search form in to my Institute's moodle. The form appears, but the search is not populated with the information input when I click search. I'm using the following code, and my catalogue page is: http://library.kcl.ac.uk/F/X1C8CFNNK...le_name=find-b HTML Code: <w:populate using="itemForEdit"> <form action="http://library.kcl.ac.uk/F/X1C8CFNNK32DAV3PAY9E1HTAQTU595XKRFJXY589I72VT6QR3V-48067?func=file&file_name=find-b" method="post"> <input type="hidden" name="Id" /> <table align="center"> <tbody> <tr> <td><label>Search: </label> </td> <td><input type="text" name="Name" /> </td> </tr> <tr> <td><label>Search by: </label> </td> <td> <select name="find_code"> <option value="WRD">All Words</option> <option value="WTI">Title words</option> <option value="WJT">Journal title words</option> <option value="WPE">Authors/Names</option> <option value="WME">Conferences</option> <option value="WCO">Organisations</option> <option value="WPF">Performers</option> <option value="WMU">Year of recording</option> <option value="WPT">Printers</option> <option value="WPV">Provenance</option> <option value="WPU">Publishers</option> <option value="WSE">Series</option> <option value="WSU">Subject words</option> <option value="WIB">ISBN</option> <option value="WIS">ISSN</option> <option value="WLN">Language</option> <option value="WYR">Year published</option> <option value="WCL">Collection code</option> <option value="WCK">Classmark</option> <option value="SYS">System number</option> <option value="BAR">Barcode</option> </select> </td> </tr> <tr> <td align="center" colspan="2"> <input type="submit" value="Search Library Catalogue" /> </td> </tr> </tbody> </table> <tags:hiddenoperationparam> </tags:hiddenoperationparam></form></w:populate> All suggestions much appreciated! Similar TutorialsHey guys I have made search form on my site but how do i get it to search my site when the user clicks search. Tried to find a tutorial on this but no luck. HTML Code: <form action="?" method="post" name="searchfield" id="searchfield"> <p>Search the Web: <input name="search" type="text" class="search" size="15" /> <input name="submit" type="submit" class="submit" value="Search" /> </p> </form> I know I have to create a script which I wold like to do in php but what do I add to the script Hi there, quite a lame question i think.. Anyone have on idea on a script, (which i believe should be quite simple) which can extract the line from an csv file and show ot in a html page at search request. In more details it should look like this : somebody enters some word in simple html search form and pushes search button, the script searches through the csv file and copies whole line with matchin word in the web page. Or maybe there is a simplier way, since csv file can be converter to any other format... Thanks in advance. Hello, I am new to posting on HTMLforums.com. I have a quick question for someone that has a good understanding of HTML (and most likely JS). On the front page of SWFL.cc I have a search box to the left. It is connected to the php search functionality in the Open-Realty Script. I would like to know if there is a way to get this functionality: I have the Purchase/Rental drop down, and I would like to know if there is any way to change the price variables depending on the selection of the purchase/rental drop down. If this is possible, could someone point me in the right direction to figure out how to go about doing this. Thank You, Brian Meyer Hi, I am having a problem. I have a HTML table on my webpage but I am having trouble searching it from my main homepage using a HTML form. The html form on the homepage is: <html> <body> <form method="post" action="http://www.example.com/sites/default/files/html_table.html" <input type="text" size="30" maxlength="1000" value="" id="textBoxSearch" onkeyup="tableSearch.search(event);" /> <input type="submit" value="Search" onclick="tableSearch.runSearch();" /> </body> </html> I have a search working fine on the html page and javascript functions conducting the search as shown he <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>JavaScript Search</title> <style type="text/css"> body { font-family: Arial; font-size: 11px; } td { font-family: Arial; font-size: 11px; } th { font-family: Arial; font-size: 11px; background-color: #c8c8c8; } input { font-family: Arial; font-size: 11px; } </style> <script language="javascript" type="text/javascript"> //define the table search as an object, which can implement both functions and properties window.tableSearch = {}; //initialize the search, setup the current object tableSearch.init = function() { //define the properties I want on the tableSearch object this.Rows = document.getElementById('data').getElementsByTagName('TR'); this.RowsLength = tableSearch.Rows.length; this.RowsText = []; //loop through the table and add the data to for (var i = 0; i < tableSearch.RowsLength; i++) { this.RowsText[i] = (tableSearch.Rows[i].innerText) ? tableSearch.Rows[i].innerText.toUpperCase() : tableSearch.Rows[i].textContent.toUpperCase(); } } //onlys shows the relevant rows as determined by the search string tableSearch.runSearch = function() { //get the search term this.Term = document.getElementById('textBoxSearch').value.toUpperCase(); //loop through the rows and hide rows that do not match the search query for (var i = 0, row; row = this.Rows[i], rowText = this.RowsText[i]; i++) { row.style.display = ((rowText.indexOf(this.Term) != -1) || this.Term === '') ? '' : 'none'; } } //runs the search tableSearch.search = function(e) { //checks if the user pressed the enter key, and if they did then run the search var keycode; if (window.event) { keycode = window.event.keyCode; } else if (e) { keycode = e.which; } else { return false; } if (keycode == 13) { tableSearch.runSearch(); } else { return false; } } </script> </head> <body onload="tableSearch.init();"> <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <input type="text" size="30" maxlength="1000" value="" id="textBoxSearch" onkeyup="tableSearch.search(event);" /> <input type="button" value="Search" onclick="tableSearch.runSearch();" /> </td> </tr> </tbody> </table> <br /> <table border="1" cellpadding="2" cellspacing="0"> <tr> <th>ID</th> <th>First Name</th> <th>Surname</th> <th>Website</th> </tr> <tbody id="data"> <tr> <td>1</td> <td>Heathesh</td> <td>Bhandari</td> <td><a href="http://heathesh.com">http://heathesh.com</a></td> </tr> <tr> <td>2</td> <td>Candice</td> <td>David</td> <td><a href="http://candicedavid.com">http://candicedavid.com</a></td> </tr> </tbody> </table> </body> </html> If anybody could help me please! I have run out of ideas I am trying to create a FORM with multiple option radio buttons. Basically this is a ready script I found on the internet. I have tried to customize it but there is a slight problem which I have been unable to fix after a lot of tries. In the below code, I am trying to open the following URLs on submit. http://www.pixmac.com/pictures/"searchterms"?a=kcalpesh http://www.crestock.com/image-keyword/"searchterms".aspx/112582/ In both the URLs the "searchterms" is dynamic and will be picked from the input box present in the form. PROBLEM PART! On submission, the URL that opens is only up to http://www.pixmac.com/pictures/"searchterms" and the affiliate ID after that gets missed. Same with the other URL on submission, the URL that opens is http://www.crestock.com/image-keyword/"searchterms" and again the affiliate ID gets missed out. Below is the complete page code for the FORM. Any help will be highly appreciated. I am not a coder and have very limited knowledge of HTML / Javascript!! <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Untitled Document</title> <script type="text/javascript"> function dosearch() { var sf=document.searchform; var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value); window.open(submitto); return false; } </script> </head> <body> <form name="searchform" onsubmit="dosearch();"> Search: <select name="sengines"> <option value="http://www.pixmac.com/pictures/"searchterms"?a=kcalpesh" selected="selected">Pixmac</option> <option value="http://www.crestock.com/image-keyword/"searchterms".aspx/112582/">Crestock</option> </select> For: <input name="searchterms" type="text"> <input name="SearchSubmit" value="Search" type="submit"> </form> </body> </html> Hello I have been asked by my manager to build our company website (www.cityends.com) My enquiry is this, how do i use html to creat a form which can search the current properties we have. And how would i go about creating a database which this form is able to read Any help is very much appreciated, i am very new to building websites, any comments on my current effort are also appreciated Thanks Mark I am just getting back into html and im already having a few problems. I am making this website for my parents to help promote their new college and so far its look excellent except for the fact that I cant get this pesky search and dropdown list to align right. www.xgenservers.com/CFC/2/index.htm The site works perfectly in Mozilla Firefox, but I cannot get it to shape out right in Internet Explorer. I could really use a helping hand on this one, thanks a ton . Hey all, I'm pretty sure this is a very easy solution, I've just been staring at it too long and am probably missing the cause. I'm using Google's site search API and using their "Results Only" setup, so I design my own search box, then just drop their code into the results page and specify the variable the query is being passed as. So here's my search box: Code: <form method="post" action="/search-results/?q="> <input id="searchTxt" type="text" maxlength="128" name="q" size="15" value="Search" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" /> <input type="image" name="op" value="Search" src="/wp-content/uploads/2011/07/search-button-magnifier.png" /> And the results code via Google: Code: <div id="cse" style="width: 100%;">Loading</div> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> function parseQueryFromUrl () { var queryParamName = "q"; var search = window.location.search.substr(1); var parts = search.split('&'); for (var i = 0; i < parts.length; i++) { var keyvaluepair = parts[i].split('='); if (decodeURIComponent(keyvaluepair[0]) == queryParamName) { return decodeURIComponent(keyvaluepair[1].replace(/\+/g, ' ')); } } return ''; } google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchControl = new google.search.CustomSearchControl('XXXXXXXXXXXXXXXXXXX'); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); var options = new google.search.DrawOptions(); options.enableSearchResultsOnly(); customSearchControl.draw('cse', options); var queryFromUrl = parseQueryFromUrl(); if (queryFromUrl) { customSearchControl.execute(queryFromUrl); } }, true); </script> <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> But nothing seemingly the query is not sent with the user to the results page. Manually adding "?q=test" shows the results work. Am I missing something here? I'm using Wordpress on this site, so not sure if the permalink setup is screwing with it at all. Thanks for the help hi everyone, ok heres my problem that is bugging me. I have a ecommerce website that im setting up and it comes with a default search feature. Code: <form name="quick_find" action="MYDOMAIN/index.php?main_page=advanced_search_result" method="get"> <input type="hidden" name="main_page" value="advanced_search_result" /> <input type="hidden" name="search_in_description" value="1" /> <input type="text" name="keyword" size="18" maxlength="100" style="width: 103px; margin-right:5px; vertical-align:middle;" value="" onfocus="if (this.value == 'Enter search keywords here') this.value = '';" /> <input type="submit" value="Search" style="width: 50px; vertical-align:middle;" /> </form> on my site i sell music LP's and each lp has in its description the year it was released. If i was to put in the above form "1996" it would search all my products and return any that have "1996" in their desctiption. With this in mind i would like to create a form that had 4 drop down boxes. day,month,year,country I have created the following code below; Code: <form name="quick_find_header" action="MYDOMAIN/index.php?main_page=advanced_search_result" method="get"> <input type="hidden" name="main_page" value="advanced_search_result" /> <input type="hidden" name="search_in_description" value="1" /> <select name="keyword"> <option value="1952">1952</option> <option value="1953">1953</option> <option value="1954">1954</option> <option value="1955">1955</option> <option value="1956">1956</option> <option value="1957">1957</option> <option value="1958">1958</option> <option value="1959">1959</option> <option value="1960">1960</option> <option value="1961">1961</option> <option value="1962">1962</option> <option value="1963">1963</option> <option value="1964">1964</option> <option value="1965">1965</option> <option selected value="1966">1966</option> <option value="1967">1967</option> <option value="1968">1968</option> <option value="1969">1969</option> <option value="1970">1970</option> <option value="1971">1971</option> <option value="1972">1972</option> <option value="1973">1973</option> <option value="1974">1974</option> <option value="1975">1975</option> <option value="1976">1976</option> <option value="1977">1977</option> <option value="1978">1978</option> <option value="1979">1979</option> <option value="1980">1980</option> <option value="1981">1981</option> <option value="1982">1982</option> <option value="1983">1983</option> <option value="1984">1984</option> <option value="1985">1985</option> <option value="1986">1986</option> <option value="1987">1987</option> <option value="1988">1988</option> <option value="1989">1989</option> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1994</option> <option value="1995">1995</option> <option value="1996">1996</option> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option> <option value="2001">2001</option> <option value="2002">2002</option> <option value="2003">2003</option> <option value="2004">2004</option> <option value="2005">2005</option> </select> <select name="keyword"> <option value="01">Jan</option> <option value="02">Feb</option> <option value="03">Mar</option> <option value="04">Apr</option> <option value="05">May</option> <option value="06">Jun</option> <option selected value="07">Jul</option> <option value="08">Aug</option> <option value="09">Sep</option> <option value="10">Oct</option> <option value="11">Nov</option> <option value="12">Dec</option> </select> <select name="keyword"> <option value="01">01</option> <option value="02">02</option> <option value="03">03</option> <option value="04">04</option> <option value="05">05</option> <option value="06">06</option> <option value="07">07</option> <option selected value="08">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <input type="image" src="includes/templates/theme013/buttons/english/button_search.gif" alt="Search" title=" Search " style="margin-left:1px;" /> </form> this gives me 3 drop down box's (YEAR,MONTH,DAY) The problem is when i click search it only searches for the year. instead of combining all the selected data (e.g. 1996+JUN+23) it just searched for 1996. The second problem is if someone managed to get this form to work, would it search for "1996JUN23" or "1996 JUN 23". The reason i ask this is my products descriptions say "this single was released on 23 June 1996" I hope ive made all the above clear!! Any help would be greatly appreciated. thanks in advance I'm a noob so please forgive me if this is a stupid question or if the info is listed somewhere else. I really did try and find it on my own. I'm trying to make a simple website that incorporates amazon's free "astore". It has a search function included in the sidebar already but i don't like it and really want to set up my own. I found this search box code: Quote: <form action="http://astore.amazon.com/adbabel-20/search" method="get" target="_blank"> <input name="node" value="8" type="hidden"> <input name="keywords" size="12" value="" type="text"> <button type="submit" >Search</button> </form> it works well but is limited to searching only one category in my store (i have several). each category is assigned a "node" number. By changing the node value in the code I can change which category the box searches. I want to create a drop down list that, upon selection, changes the node value and thus the category that is to be searched. Can anyone let me know how this might be done? For example, this scenario: 1. My page contains the text "giraffes in corduroys" 2. somebody googles that text - either as a phrase or just the words 3. google points them to my page 4. the user clicks to go to my page... Is there any way to determine that it was the text "giraffes in corduroys" which brought them to my page? Would the crux be getting the previous URL in the browser history? Hi, I am wanting to impliment a feature where I can install a search box on my website that will search anothers content. Basically I have two sites, one has thousands of sound effects on it, the other is more of a portal site. On the portal site I want to add a search box that will link into the other sites database so that the user would navigate away from the portal site and be taken to the stabndard search results page of the main site based on thier queory. Is there any code that anyone knows of to do this? Thanks all! Hi...not sure if this is the proper place to post this or not. I'm trying to do two things...first: I'm trying to set up a search box in frame 1 that will search, scroll to and highlight text in frame 2. Is this possible? I've been searching around for days looking for answers, and have so far come up short. I managed to create a search box in frame 1 that reloads frame 2, but that's not really what I'm after. ---------------------------- Now for the second thing I'm looking to do (along the same lines): I want to click a link in frame 1 that scrolls to a target in frame 2 and highlights it. The target is a word in the middle of a paragraph. Any help would be appreciated. I'm pretty green, so treat me like a beginner. Thanks so much! Hi, I want to make a search box on my website. The thing is that I would like the search bar to be able to search on multiple search engines. For example I can type a movie in the search field and then I can select if I want to search for the movie either on google or on IMDb. I want it to look like this: http://subtext.no/kjartan/charlie/searchbox.png If anyone could help me get this kind of searchbox it would be great. Thanks in reaply. I'm trying to have my search box and search button aligned but I can't seem to get it working. Whenever I try to move one vertically, both of them end up moving and I'm all out of ideas. Here is the code: Code: <script src="http://supportforms.epnet.com/eit/scripts/ebscohostsearch.js" type="text/javascript"></script> <form action="" method="post" onsubmit="return ebscoHostSearchGo(this);"><input id="ebscohostwindow" name="ebscohostwindow" type="hidden" value="1" /> <input id="ebscohosturl" name="ebscohosturl" type="hidden" value="http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=1&custid=S6281220&groupid=Main&profid=EDS&mode=bool&cli0=FR&clv0=Y&cli1=RV&clv1=Y&cli2=PT82&clv2=(PT+Academic+Journal+or+PT+Periodical+or+PT+Trade+Publication)%7e(PT+Book+or+PT+Almanac+or+PT+ebook+or+PT+audiobook)%7e(PT+Newspaper+or+PT+NEWSP+or+PT+Newswire+or+PT+WIRES)&lang=en&authtype=guest" /> <input id="ebscohostsearchsrc" name="ebscohostsearchsrc" type="hidden" value="url" /> <input id="ebscohostsearchmode" name="ebscohostsearchmode" type="hidden" value="+" /> <input id="ebscohostkeywords" name="ebscohostkeywords" type="hidden" value="" /> <div style="background-image: url('http://i.imgur.com/Wjilo.jpg'); background-repeat: no-repeat; width: 900px; height: 600px; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 9pt; color: #353535;"> <div style="padding-top: 249px; padding-left: 70px;"><span style="font-weight: bold;" ></span> <div> <input id="ebscohostsearchtext" name="ebscohostsearchtext" type="text" size="23" style="font-size: 16pt; padding-right: 340px; height: 50px;"> <button type="submit" style="border: 0; background: transparent;"><img src="http://i.imgur.com/nYPoa.png" width="145" hspace="25" alt="submit" /> </div> </div> </div> </form> I'm using IE8 to test Hi, I'm trying to add a google search box (in a table) to my web page, but for some reason it the input button links to the page I am currently on. The strange part is that I put the same exact code in another cell right next to the other google search box and that one works wonderfully while the first one still links to the current page. It is the same with any search engine (yahoo, bing, ask), the first search box links to the current page and the rest work great. Here is the code I use: Code: <form method="get" action="http://www.google.com/search"> <input style="width:140px" type="text" name="q" size="31" maxlength="255" value="" /><br /> <input type="submit" value="Google Search" /> </form> All the inputs I have ever made have been using the simple html
HTML Code: <form><input type='text'> sort of commands, though i have got to the point where i would like to learn how to make a search box like the big one in the middle of the page found at http://www.cafepress.com.au/. How does this search bar work? I am working of a website and i am having a little trouble with getting the search bar and the nav bar to align correctly. If you think you can help please send me an AIM at weroll04 . or reply back to this post. http://69.49.183.11/ Thanks Darryl How do I amend the following code to remove everything apart from the actual search box and the 'Google Search' button? When I insert the code into a web page, I don't want to see the radio buttons or the words next to them but I want to keep the functionality. <form method="get" action="http://www.google.com/search"> <input type="text" name="q" size="31" maxlength="255" value="" /> <input type="submit" value="Google Search" /> <input type="radio" name="sitesearch" value="" /> The Web <input type="radio" name="sitesearch" value="askdavetaylor.com" checked /> Ask Dave Taylor<br /> </form> Thanks. |