first of all the original code was not written for mysql .... it was written to search an xml file... html ajax php xml $q = getelementbyid"livesearch.php?q=+str $q = strlen>0 get q = strlen>0 $q = stristr = xml $hint = $hint = "<a href = " " but this is what i want to see ... html ajax php mysql $q = getelementbyid"livesearch.php?q=+str $q = strlen>0 get q = strlen>0 $q = stristr = mysqltable $hint = $hint = "<a href = " "
You....you want to see what? Your question makes pretty much no sense. Adding random screenshots also doesn't help. Do you want to build a search that queries MySQL and not XML?
yes a live search .... html ajax .....php mysql <input type = "text" id = "livesearch" $q = getelementbyid "livesearch.php?q= +str $q = strlen>0 get q = strlen>0 $q = stristr = mysqltable $ hint = $ hint = "<a href = " "
http://www.w3schools.com/php/php_ajax_livesearch.asp Code (markup): ok.. bit of an update... ok .. this was part of a code that does live search ..in an xml file... i was planning it to modify for my need to search a mysql database table .. where it looks in the feild productname... i dont even know if it can be acheived in the long run at this rate ... the ajax should be able to call an element by id for processing .. in a scenario where more form feilds with id is involved ... as for ajax new xmlhttprequest needing a php file in the form of a url for processing data inside it ... i dont think i can get confused more than this especially when i saw the code where the ajax script fetches a php file... from the usual location of a webserver ... with the extra parameters... like livesearch.php?q=+str,true .. does that php file end like that ... ? if so .. is ajax in the firefox browser able to interpret the contents of that file ending with the unusual extension ?q=+str,true now strictly following the sample code... $q in php should be able to process the input feild document.getelementbyid('productname') because the ajax script is sending document.getelementbyid('productname') to the php file location ... where $q gets the document.getelementbyid('productname')