Jump to content

ahill

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by ahill

  1. yes it displays as a dropdown of results in an Ajax search box. looks the same as when I started but is not text wrapping yet. I believe I have the jquery there now but need to figure what css property is used to wrap the text in jquery
  2. Ok so I found an example and fixed it to work with my database but cant get it to text wrap correctly. can I get a little help with the csshttp://www.codelocker.net/30498/select-list-jquery/
  3. so looking at some scripts basically I just have to replace the <select> </select> with the Jquery script
  4. So I don't need any software installed on my server to use it? do I just put a link into the code to a library?
  5. So sorry for being new, but is jQuery something that has to be installed or is it a part of JavaScript?
  6. Any chance you could show an example of the wrapping. I had to do the 160% because I had to put the box -px to make it extend to the left of the box so I could only use 160% to make it go to the right. it still cuts it off if I use lets say 60%.
  7. took the html out. still no luck. Have tried every style I can think of but it still wont text wrap
  8. Hey guys I have a search box that works but I have 2 issues.1. I cant get the text to wrap.2. I cant put space between each of my results like a <br>Everything else works except for these two issuesHere are the links to my codeIndex------------------------------http://www.codelocker.net/30493/searchbox/livesearch-------------------------------http://www.codelocker.net/30494/searchbox/
  9. Starting from scratch so I don't have one yet. I wana write one is classic asp if possiable
  10. Looking for any links to good forum templates that I can use on my site. Any suggested ideas?
  11. here is what the box currently looks like
  12. I am currently using the CSS width: 100% property in my drop down list in my classic asp page. My JavaScript call this asp page and does the work from there. My box displays fine in Google chrome amd wraps the text to the box but the css is ignored in Internet Explorer and runs off the page. Any ideas how to work around this?
  13. Wait now I was able to make it search. I changedterm = Replace( Trim(Request("word")), "'", "''" )TOterm = Replace( Trim(Request("q")), "'", "''" )Since javascript is passing the variable q from index.html to livesearch.asp.-----------------------------------------------------------------------------------My only problem is now is that I have to figure out how to get each result to display on its own line, right now they are all one line.ex.NOWresult1 result2 result3 result4What I wantresult 1result 2result 3result 4
  14. and it looks like somewhere on my index page the words typed in the box should have to gather in a variable called "word" and then passed the the sql page to pull. Not quite sure how the JS works
  15. its pulling from my advancedtrouble table in my test database. I had the top 10 * in yesterday by mistake when I posted. It dose not make any noticeable impact though..For the term it should be referencing my database and changing on input of a character. only thing I am confused with is they haveterm = Replace( Trim(Request("word")), "'", "''" )SQL = "select top 10 * mproblem from DBtable where mproblem like '%" & term & "%'"---------------------------------------------------------------------------------------------shouldn't it be something more likeSQL= "select mproblem from DBtable where mproblem like '% %' or mproblem like '"+ term +"'"ORSQL = " select mproblem from DBtable where mproblem like '"% & term & %"'Both of these fail if used
  16. Ok so I was able to find some javascript and then match it to an asp style code. The box drops down with data but it is 1.not filtering 2. filled with every single DB entry for mproblem. any idea where the code is missing to filter? I kind of understand the JS and the asp but it looks somewhat foreign to me index.html---------------------------------- <html><head><script>function showResult(str) {if (str.length==0) {document.getElementById("livesearch").innerHTML="";document.getElementById("livesearch").style.border="0px";return;}if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safarixmlhttp=new XMLHttpRequest();} else { // code for IE6, IE5xmlhttp=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.asp?q="+str,true);xmlhttp.send();}</script></head><body><form><input type="text" size="30" onKeyUp="showResult(this.value)"><div id="livesearch"></div></form></body></html> livesearch.asp--------------------------------------</head><body><%term = Replace( Trim(Request("word")), "'", "''" ) ' protect against SQL injection even here!SQL = "select top 10 * mproblem from DBtable where mproblem like '%" & term & "%'"Set conn = Server.CreateObject("ADODB.Connection")Conn.Open "DSN=test;UID=test;PWD=test1234;Database=test"Set RS = conn.Execute(SQL)Response.Write RS.getString()RS.CloseConn.CloseResponse.End%></body></html>
  17. only thing I have access to right now is classic ASP. ASP.Net isn't installed on the IIS and they wont get around to it till this fall I guess. So only thing I can really work with is classic ASP and javascript
  18. Does Anyone have any leads on ajax templates with drop-down filtering menus. All i am finding are ones written for php
  19. ok. Just looking at the layout it looks like it would be a lot easier to have search suggestions as you type so the user knows that there is and I am hoeing that making it like a Google search will be a lot easier and friendlier to navigate.
  20. was just doing a little research and think I might skip the whole search box and build an AJAX search box. Looks like its more along the lines of what I am wanting to do.
  21. Eh that's what I was told we had to code in right now and will be switching over to .net later into the fall.
  22. Anywhere I can look to get an idea of how to do this. Just learned the basics of classic asp. now working on learning the advanced stuf
  23. So I have to try and write a code that generates a new like clause for every word in the searchbox?
  24. so do I actually wana use oil and type in my code or do I want to leave the % % blank or should I actually populate them? The text gets entered in a search box that references the mproblem column on the classic ASP vbscript side. my Dim is mproblem=request("problem")
  25. so I only have one DB column that I am searching which is mproblem so you are sayingSelect * from DBtable WHERE mproblem LIKE % & mproblem & % and field LIKE % &mproblem & %
×
×
  • Create New...