ColdEdge Posted February 14, 2009 Share Posted February 14, 2009 Hi, at w3schools site there is an example of ajax search how do i make it so it goes over my website layout not make it biggers like youtube does... Link to comment Share on other sites More sharing options...
jlhaslip Posted February 14, 2009 Share Posted February 14, 2009 I am pretty sure that the Search Feature here is a php Datbase search feature.No Ajax involved.Start by learning some php and mysql to perform a search of your Database.First, of course, you need to build the content, so perhaps a Content management system would be a good tool for you? Lots of them available and most of the current ones include a Search feature.Google Joomla and sNews CMS Link to comment Share on other sites More sharing options...
ColdEdge Posted February 15, 2009 Author Share Posted February 15, 2009 As i stated i wish to use PHP+AJAX based search engine that echos internal XML file some thing like YouTube has or and one of the examples over here at W3Schools.com the problem is that it expands the page when the result drop down do to this i require the following modifications.1- YouTube style dropdown so it goes over my website layout not in it making it bigger and bigger.2- If user inputs a request for "A" titled contence he or she will only get a list of contence titles that start off with "A" not like the curent one which will load anything that has a letter in it, an example: User searched "B" they will get Block, Blade, Bee not Webmail, MyBB or any other word that contain the letter some where in it so basicly just the first letter titles are shows.I suppose i have not provided a clear request help, while posting this post but i did state that it is on W3Schools and it looks something like youtube. PHP+MySQL search engine is too comples while my site includes a CGI search engine i dont seem to understand what it means and where can i store the file which can be queried in my cPanel->File Mannager.<!--- EDITED ---!>Here is the link "Jlhaslip" http://www.w3schools.com/php/php_ajax_livesearch.asp as you can see it is a PHP+AJAX Livesearch Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2009 Share Posted February 16, 2009 For a floating dropdown, do some searching on floating CSS layers. That can be a div with absolute positioning, for example, that's one way to do it. To get things to search for words starting with what you type, leave off one of the wildcard characters in the SQL statement. e.g. instead of this:SELECT ... WHERE field LIKE '%...%'do this:SELECT ... WHERE field LIKE '...%' Link to comment Share on other sites More sharing options...
ColdEdge Posted February 16, 2009 Author Share Posted February 16, 2009 @ JustsomeguyI am sorry but i do not get where your going with the SQL Search, all I need is some help to modifie the PHP+AJAX search that is provided here which echos "XML" file for data. And I am sorry but i could not find that CSS comand =( Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2009 Share Posted February 16, 2009 For the XML search, you can change this line in the PHP script:if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q))to this:if (strpos(strtolower($y->item(0)->childNodes->item(0)->nodeValue),strtolower($q)) === 0)For the other issue, check here:http://www.google.com/search?client=opera&...-8&oe=utf-8 Link to comment Share on other sites More sharing options...
ColdEdge Posted February 18, 2009 Author Share Posted February 18, 2009 Ok, so i got the first letter working but i can still cant find out the code which will allow my search to hover over the theme with out expanding it an example of what i mean is "YouTube.com" search bar... Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2009 Share Posted February 18, 2009 Did you look at the link? You need to use a DHTML popup. There are a ton of examples. Link to comment Share on other sites More sharing options...
ColdEdge Posted February 18, 2009 Author Share Posted February 18, 2009 Well yes i did ^^ and thank you for that as i got tons of usefull stuff such as hover login box.. Link to comment Share on other sites More sharing options...
Guest morten Posted March 12, 2009 Share Posted March 12, 2009 Sorry for bumping an old topic.I have the following xml data to search:"option 1 - red, blue, green", "option 2 - magenta, black, green", "option 3 - green, blue, yellow"When I search for "blue", I get"Option 1 - red, blue, green""Option 3 - green, blue, yellow"But I need to be able to search for multiple items, ex. "blue yellow", which will output"Option 3 - green, blue, yellow"The user will input the colors he prefers, and the autocomplete will output the Option that matches. Do you know how to do this? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.