Jump to content

Search the Community

Showing results for tags 'search'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH


  • Community Calendar




Website URL








Found 20 results

  1. It's getting frustrating having to wait on the timer before being allowed to proceed the search on the forum for answers for my coding problems. I understand it's a measure against bots/server flooding, but isn't it better options around that doesn't put so strict limitations on us users?
  2. Google Custom search

    Hi Guys So I just update my Google Custom Search code. AND W3 CSS is screwing it up! I remove the css and google code is fine. I put the w3 back and the search button screwily dissapears. I cant find any help. So pls help!
  3. How to make HTML search ?

    Hello Everyone, How to make HTML Search Like Google But : For Example my link is example.com/videos When I want to make search for this word funny by HTML inbut and when I click submit button the result should be like this: example.com/videos/funny How I do that, please ... Thanks
  4. PHP and AJAX live search

    hello im new to the website and web programming in general, im in need of assistance with your w3schools official AJAX live search tutorial, i've copied the code to the right files, livesearch.php and index.html, which are placed in my htdocs folder and the apache server is running well. I know my code has css issues but i need to fix something else, mainly this: This is my search form, located in a table, inside a div tag: After i type in a single letter this happens: The search box disappears, instead of auto completing the word as long as i type. And even these results are shown below the "A7 Embedded PC" image, even tho my form has a z-index set to 9999. This is my livesearch.php code: <?php $xmlDoc=new DOMDocument(); $xmlDoc->load("links.xml"); $x=$xmlDoc->getElementsByTagName('link'); $q=$_GET["q"]; if (strlen($q)>0) { $hint=""; for($i=0; $i<($x->length); $i++) { $y=$x->item($i)->getElementsByTagName('title'); $z=$x->item($i)->getElementsByTagName('url'); if ($y->item(0)->nodeType==1) { if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q)) { if ($hint=="") { $hint="<a href='" . $z->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . $y->item(0)->childNodes->item(0)->nodeValue . "</a>"; } else { $hint=$hint . "<br /><a href='" . $z->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . $y->item(0)->childNodes->item(0)->nodeValue . "</a>"; } } } } } if ($hint=="") { $response="Nema rezultata!"; } else { $response=$hint; } echo $response; ?> And this is my index.html code fragment that contains the form: <script> function showResult(str) { if (str.length==0) { document.getElementById("livesearch").innerHTML=""; document.getElementById("livesearch").style.border="0px"; return; } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("livesearch").innerHTML=xmlhttp.responseText; document.getElementById("livesearch").style.border="1px solid #A5ACB2"; } } xmlhttp.open("GET","livesearch.php?q="+str,true); xmlhttp.send(); } </script> </head> <body background="images/osnovne_slike/pozadina01.gif" vlink="#0000FF" link="#0000FF" alink="#808080" style="background-attachment: fixed"> <div align="center"> <center> <table border="0" width="990" cellspacing="0" cellpadding="0" background="images/slike_index/header_home.png"> <tr> <td width="600" height="46"> <div id="livesearch" style=" height:46px; z-index: 9996; float: right;"> <form class="form2" style=" z-index: 9999" action="livesearch.php" method="get"> <input class="input2" type="search" onkeyup="showResult(this.value)" placeholder="Pretrazi.."> </form> </div> </td> and some css for the form and input: <style> .form2 { font-family: 'Open Sans', sans-serif; vertical-align: :bottom; color:#848484; width:170spx; padding:4px 4px 4px 4px; margin:8px 5px 5px 5px; line-height: 15px; border-radius:1px; background:#f2f2f2; } ::-webkit-input-placeholder { color: #acacac;} .input2 { margin:0px 1px; border:none; background-color:#fafafa; background-repeat:no-repeat; background-size:45px 45px; background-position:left center; height:19px; width:169px; vertical-align:bottom; text-align: left; font-size:16px; border-radius:2spx; } </style> I dont know what is causing the php to display all the results at once, while the code is completely copy-pasted from w3schools website. If anyone can help me with this i'd be very grateful. UPDATE: i have placed the w3schools code in separate files and ran them in a browser using my xml document and the search is running fine, something on my website seems to be preventing the autocomplete.
  5. Hi all, I have created a static web site on our company network. It is not exposed to the internet. They are pure HTML - no CSS or scripting so far. I meant for it to be very simple cause I was very limited by time. But, apparently, a search mechanism is required. I found the google and other auto creators on the web. But they require ,as far as I understood, to set an internet web URL and do not support internal sites. whereas my urls domain is in the form of: 192.168.4.xxx/something.htm So, do you know a solution I can use? a free component or a javascript I can use? Thanks!
  6. Hide information

    I have a marketplace website in development stage. I searched the internet, but did not find anything. User has 2 options, either can signup as a company or individual. In other words seller or buyer resp. 1. I want to hide buyer information in search results. How? Any tutorial with complete code/snippet? 2. I want to hide seller and buyer contact details. Currently, logged-in members can see contact details. Any tutorial?
  7. Search box position.

    Hello everyone!I am relatively new to the whole idea of web developing,and I am currently learning most of the things.I've created a website using joomla,but I constantly have this problem,which I cannot find how to solve.Basically joomla has its administrator control panel where you can edit some things,but if you want to edit more than the basic you have to locate,and edit css or html (correct me if Im wrong). And this is where my problem starts. Although I can sometimes edit something using firebug tool of the browser,I cannot find the css file (through FTP) to edit and make my changes permanent.Could you please show me how I can do that step by step?What I am currently trying to do is change the position of the search box (I am trying to do exactly what this website here has done with its search box,so top right corner),but there is only one ''module position'' as its called in joomla,and this is the ''nav'' position.Once the search box is placed in the nav position,it is being placed directly underneath the home tab (as seen in the screenshot).You can see in the screenshot where I would like it to be with red letters.The website is: http://www.georld.com/Help guys !
  8. Searching for multiplie words in sql

    Hello everyone, I did try to search alot for an answer on this one, but I could not find it anywhere. I'm trying to have a simple search feature for my site, but I keep getting a blank page when doing a search containing multiplie words "like this" Tried to work it out with a str_replace but did not do the trick, have done this before, and it does work when just outputing the val as an echo instead of a query, so I'm blank now and appreciate any help! //function for replacing empty space with % function moreWords($val){$val = str_replace(" ","%", $val);return $val;} //Query$getCategoriesResults = mysql_query("SELECT * FROM `database`.`forumCategories` WHERE description LIKE '%".moreWords($_GET['search'])."%'");
  9. HTML5 seems to have a function that marks the results of a search in the scroll bar. Is there a way to use these scrollbar highlights without a search? I have a number of large HTML documents, in which a number of terms are highlighted in different colours. It would be great if the location of these highlighted terms could be signaled on the scrollbar, in the same way search results are indicated, in order to make browsing through these documents easier. Does anyone have an idea how to do this? Thanks!
  10. updated search engine

    i've tried to update my search engine, but every time i search for something in my script it keeps on displaying my custom error, which is no result found on $k. <h1>Search:</h1> <form action="search.php" method="GET" class="search"> <input type="text" name="k" size='50' value="<?php echo $_GET['k']; ?>" /> <input type="submit" name="submit" value='Search' /> </form> <?php $username = $_SESSION['username']; if(isset($username)) { include "navigator/navigator_login.php"; } else { include "navigator/navigator.php"; } ?> <hr /> <?php include "connect.php"; $k = mysqli_real_escape_string($con, htmlentities(trim($_GET['k']))); $terms = explode(" ", $k); $query = "SELECT * FROM videos WHERE "; $i = 0; foreach($terms as $each) { $i++; if($i == 1) { $query .= "description AND title LIKE '%$each%' "; } else { $query .= "AND description AND title LIKE '%$each%' "; } } $result = mysqli_query($con, $query) or die(mysqli_error($con)); $numrows = mysqli_num_rows($result); $count_query = mysqli_query($con, "SELECT NULL FROM videos"); $count = mysqli_num_rows($count_query); if(isset($_GET['search'])) { $page = preg_replace("#[^0-9]#","",$_GET['search']); } else { $page = 1; } $perPage = 2; $lastPage = ceil($count/$perPage); if($page < 1) { $page = 1; } else { if($page > $lastPage) { $page = $lastPage; } } $limit = "LIMIT " . ($page - 1) * $perPage . ", $perPage"; $query = mysqli_query($con, "SELECT * FROM videos ORDER BY id DESC $limit"); if($lastPage != 1) { if($page != 1) { $prev = $page - 1; $pagination .= '<a href="pagination.php?search='.$prev.'">Previous</a> '; } if($page != $lastPage) { $next = $page + 1; $pagination .= '<a href="pagination.php?search='.$next.'">Next</a>'; } } while($row = mysqli_fetch_array($query)) { $title = $row['title']; $url = $row['url']; $description = $row['description']; if($numrows > 0) { while($row = mysqli_fetch_array($result)) { $id = $row['id']; $title = $row['title']; $url = $row['url']; $description = $row['description']; if($k == "") { echo ""; } else { echo "<h3><a href='$url'>$title</a></h3> $description"; } } } else { echo "no results on $k"; } } echo $pagination; mysqli_close($con); ?>
  11. search engine

    this script is supposed to let me search by multiple keywords, but only lets me search by one at a time. The error i get when i try to type in several keywords is: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:wampwwwsearch.php on line 32 <h1>search engine</h1> <form action="search.php" method="get"> <input type="text" name="k" size='50' /> <input type="submit" name="submit" value='Search' /> </form> <hr /> <?php include "connect.php"; $k = $_GET['k']; $terms = explode(" ", $k); $query = "SELECT * FROM search WHERE "; foreach($terms as $each) { $i = 0; $i++; if($i == 1) { $query .= "keywords LIKE '%$each%' "; } else { $query .= "OR keywords LIKE '%$each%' "; } } $result = mysqli_query($con, $query); $numrows = mysqli_num_rows($result); if($numrows > 0) { while($row = mysqli_fetch_array($result)) { $id = $row['id']; $title = $row['title']; $description = $row['description']; $keywords = $row['keywords']; $link = $row['link']; if($k == "") { echo ""; } else { echo "<h2><a href='$link'>$title</a></h2> $description"; } } } else { echo "no result on $k"; }
  12. search engine

    so here is my search engine script, and it works, but every time i refresh the page, all of the data in my database are displayed on my search.php page. Why? What can i do? <h1>search engine</h1> <form action="./search.php" method="get"> <input type="text" name="k" size='50' value="" /> <input type="submit" name="submit" value='Search' /> </form> <hr /> <?php @$k = $_GET['k']; $terms = explode(" ", $k); $query = "SELECT * FROM search WHERE "; foreach($terms as $each) { @$i++; if($i == 1) { $query .= "keywords LIKE '%$each%' "; } else { $query .= "OR keywords LIKE '%$each%' "; } } include "connect.php"; $query = mysql_query($query); $numrows = mysql_num_rows($query); if($numrows > 0) { while($row = mysql_fetch_assoc($query)) { $id = $row['id']; $title = $row['title']; $description = $row['description']; $keywords = $row['keywords']; $link = $row['link']; echo "<a href='$link'>$title</a><br /> $description <br /> "; } } else { echo "ingen match funnet ved $k"; } ?>
  13. <link>,rel attribute search

    Hi I try add search to my page but it does not workin w3 it said:search value use Links to a search tool for the documenthttp://www.w3schools...tt_link_rel.aspplease help methanks <!DOCTYPE html><html><head><link rel="search" type="text" href="www.google.com"></head><body><h1>I am</h1><p>Me too!</p></body></html>
  14. Help Me Gyz

    suppose i have 10 products in my database Example:iphone 2 - iphone 3g - laptop i3 - laptop i7 - nokia n96 etcwhen i enter iphone in my search i see all records stored in database thats my prob!what i want ?suppose if i enter laptop i7 or laptop then i get result for laptop i7 or laptop here is my code.. <?php// Connects to your Databasemysql_connect("host.com", "userr", "pass") or die(mysql_error());mysql_select_db("products") or die(mysql_error()); [/font][/color][color=#000000][font=verdana, geneva, lucida,]$data = mysql_query("SELECT * FROM Products")or die(mysql_error());Print "<table border cellpadding=3>";while($info = mysql_fetch_array( $data )){Print "<tr>";Print "<th>Name:</th> <td>".$info['name'] . "</td> ";Print "<th>new:</th> <td>".$info['new_price'] . "</td> ";Print "<th>old:</th> <td>".$info['old_proce'] . "</td> ";Print "<th>faulty:</th> <td>".$info['Faulty_price'] . " </td></tr>";}Print "</table>";?> if any one have better code then please give me tankxx
  15. search

    How to create search within the pages of website ? how to create this kind of functions.
  16. hello every buddy, i want to show my search engines top 10 recent searches in my siteplz see my search enginewww.topmse.com it is php based search enginei want to show its recent searches by users in my site for getting its result pages indexed on google.plz somebuddy help me.i can create a database but i was not able to create a working script for this programe that is why i posting here. it is urgent plz help me. plz help me
  17. php dropdown list not working?

    hi folks, need some help with this, iv got this code off a website, just the php part, iv put this code into a dynamic region of my site, as told to do, but when i then add it to a page style it doesnt show.now i know im probably missing a huge part of it but i dont even know what that is.and i still need to link eack option to a certain page of my site.any help i would be very grateful! <?phpfunction countrylist($action = 'dropdown', $selectedid = null) { $country_list = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan",...and so on.... ); if ($action == 'dropdown') { foreach ($country_list as $country) { echo "<option value=\"".$country."\""; if (!empty($selectedid)) { if ($selectedid == $country) { echo " selected=\"selected\""; } } echo ">".$country."</option>\n"; } } elseif ($action == 'list') { foreach ($country_list as $country) { echo "<li>".$country."</li>\n"; } }}?>if possible id like to be able to add a secondary option field to narrow that searh results that show up on a search page, the idea is for this to search specific event pages..
  18. hey folks,im totally confused with trying to create a search section on my home page which allows users to narrow their search by using small drop boxes, ie, <select country>, then, <select city> and so on.its a pretty big part of my site so iv been searching for a long while now trying to figure it out.anyone know how to do this?
  19. This is very strange. I signed up for this forum yesterday, but I found that when I use the search function here, I never get any results! After browsing through some of the topics, I decided to search for "SQL" (which is all over the place) and still no luck. I've tried other very common subjects, but not a single hit. I've tried both the simple search and the advanced mode. I'm on several other forums and I've never encountered such a weird problem. I've also checked my account/profile but can't see anything there that might affect me. Any clues please?
  20. I'm looking to redo a form I have on my website. Currently the forms allows for users to select each separate category, and then when they click the value directs them to a url value in that category: Excerpt for current form: <form name="miscellaneous"><center> <select name="menu" class="airplanefoodsearch"> <optionvalue="/images/lounge-food/">AIRLINE LOUNGE FOOD</option> <optionvalue="/images/amenity-kits/">AMENITY KITS</option> <optionvalue="/images/air/cabins/">CABIN INTERIORS</option> </select> <input value=""onclick="location=document.miscellaneous.menu.options[document.miscellaneous.menu.selectedIndex].value;"type="button"> </center> </form> ********************This form works fine for users to browse each category. But now instead I would like to change the form to a search form. and this is what I came up with: <form name="search" method="get"action="/images/page/search/" ><center> <select name="airline" class="airplanefoodsearch"> <option"united">UNITED AIRLINES</option> <optionvalue="delta/">DELTA AIRLINES</option> </select> <select name="menu" class="airplanefoodsearch"> <optionvalue="lounge">AIRLINE LOUNGE FOOD</option> <optionvalue="amenitykits">AMENITY KITS</option> </select> <input type="submit" value="Submit" /> </center> </form> The issue is that when directed to the search url it adds extra characters= ? & etc. Is there anyway to tell the form, when you hit submit to go to: images/page/search/united+menu rather than: images/page/search/?=united&menu Because my search engine does not recognize any other characters other than the word, space, or the "+" sign. Any help or guidance is appreciated. I'm a newbie so please be nice.