Jump to content

DrChocolate

Members
  • Posts

    8
  • Joined

  • Last visited

DrChocolate's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. I did everything you suggested, and it now works perfectly! Just so you can bask in the brilliance of your ideas, here are the latest changes: 1) There was a opacity problem. I had layers present. There was another layer hiding some of the results. I got rid of the layer and half the results showed up!2) I tried adding left and top position and nothing moved. So I re-typed it and nothing moved. So I changed the order and of top and left and, poof, the results moved!. Then as I changed the position a bit here and there, it disappeared and re-appeared. So after a half an hour of changing values and retyping and reloading, I guessed another coordinate (130 left and 200 top) and poof -- it showed up perfectly! I ain't touchin' it. All you guys are fantastic--niche, lngolme, justsomeguy, and roy0702. Each one of you helped me see something I was missing but needed desperately (sometimes right in front of my face of course) and some of you provided concrete ideas that solved problems. They all were needed! Now I'm off to see if I can figure out a way to have the VBA code construct the XML file (no problem) and then save it encoded in ETF-8 so I don't have to open up the file in Notepad and re-save it (no big deal, but it's not elegant). I found a few solutions on the web but they are crazy-complicated and I'm determined to find something simpler. I'll be tidying up some details and then start to enter real data into the site. It will take a couple of months (with a lot of luck and no new big pop-up problems) to re-gather accurate resource data (so we don't put garbage data on the new site), but I'll put a post here when it's up and running. I'm hoping and expecting that I won't be bothering you all about this project. Thousands of people with severe medical and other problems will be using this site. We'll also be donating the database system and site mechanics to other nonprofits who don't have the time (it's nice being retired) or resources to utilize a wide variety of "technologies" to make it all work smoothly. Thank you heaps! Enjoy! A smiling Dr. C (not to be confused with Lil' C)
  2. Good point -- I'm just trying to find out why the results of the instant search appear in a weird location. Try it at this link -- type the letter a and you'll see it in action. http://www.woofwoofw...is01/search.htm Thanks -- Dr.C.
  3. By the way, I'm bothered by the <input type... line (about 9 lines from the bottom and marked with an *) because it has two ID's. The first is the CSS reference; the second tells it something, but I don't understand what. Please note that on my site without all the surrounding code, the Instant Search worked perfectly and the results came out just below the input box. Hmm Thanks!-- DrC
  4. I'm not sure this will help, but here's the entire HTML for that page in case something else is taking priority over the position commands in the script. I've attempted to mark the relevant sections in a color but it appears on my screen just to appear as a bunch of lines beginning with . Thank you. =============================== <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Search page - SupportWorks</title><meta name="description" content="Omitted"><meta name="keywords" content="SupportWorks search page, Charlotte NC, support groups"><style type="text/css">div#container{ width: 994px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left;}body{ text-align: center; margin: 0; background-color: #9999CC; color: #000000;}</style><style type="text/css">a{ color: #282828; text-decoration: none;}a:visited{ color: #282828;}a:active{ color: #282828;}a:hover{ color: #FF0000; text-decoration: none;}</style><style type="text/css">#Line1{ color: #3300CC; background-color: #3300CC; border-width: 0px;}#wb_Shape8 a img{ position: absolute;}#wb_Shape8 span{ position: absolute;}#wb_Shape8 a .hover{ visibility: hidden;}#wb_Shape8 a:hover .hover{ visibility: visible;}#wb_Shape8 a:hover span{ visibility: hidden;}#wb_Shape9 a img{ position: absolute;}#wb_Shape9 span{ position: absolute;}#wb_Shape9 a .hover{ visibility: hidden;}#wb_Shape9 a:hover .hover{ visibility: visible;}#wb_Shape9 a:hover span{ visibility: hidden;}#wb_Shape10 a img{ position: absolute;}#wb_Shape10 span{ position: absolute;}#wb_Shape10 a .hover{ visibility: hidden;}#wb_Shape10 a:hover .hover{ visibility: visible;}#wb_Shape10 a:hover span{ visibility: hidden;}#wb_Shape4 a img{ position: absolute;}#wb_Shape4 span{ position: absolute;}#wb_Shape4 a .hover{ visibility: hidden;}#wb_Shape4 a:hover .hover{ visibility: visible;}#wb_Shape4 a:hover span{ visibility: hidden;}#Image2{ border: 0px #000000 solid;}#Layer1{ background-color: #FAFAFA; opacity: 0.00; -moz-opacity: 0.00; -khtml-opacity: 0.00; filter: alpha(opacity=0);}#Image1{ border: 0px #000000 solid;}[color=#b22222][b]#Editbox1[/b][/color][color=#b22222][b]{[/b][/color][color=#b22222][b] border: 2px #000000 solid;[/b][/color][color=#b22222][b] -moz-border-radius: 25px;[/b][/color][color=#b22222][b] -webkit-border-radius: 25px;[/b][/color][color=#b22222][b] border-radius: 25px;[/b][/color][color=#b22222][b] background-color: #CCFFFF;[/b][/color][color=#b22222][b] color :#282828;[/b][/color][color=#b22222][b] font-family: Arial;[/b][/color][color=#b22222][b] font-size: 20px;[/b][/color][color=#b22222][b] padding: 0px 0px 0px 20px;[/b][/color][color=#b22222][b] text-align: left;[/b][/color][color=#b22222][b] vertical-align: middle;[/b][/color][color=#b22222][b]}[/b][/color][color=#b22222][b]</style>[/b][/color][color=#b22222][b]<script type="text/javascript">[/b][/color][color=#b22222][b]function showResult(str)[/b][/color][color=#b22222][b]{[/b][/color][color=#b22222][b]if (str.length==0)[/b][/color][color=#b22222][b] {[/b][/color][color=#b22222][b] document.getElementById("livesearch").innerHTML="";[/b][/color][color=#b22222][b] document.getElementById("livesearch").style.border="0px"[/b][/color] [color=#b22222][b] return;[/b][/color][color=#b22222][b] }[/b][/color][color=#b22222][b]if (window.XMLHttpRequest)[/b][/color][color=#b22222][b] {// code for IE7+, Firefox, Chrome, Opera, Safari[/b][/color][color=#b22222][b] xmlhttp=new XMLHttpRequest();[/b][/color][color=#b22222][b] }[/b][/color][color=#b22222][b]else[/b][/color][color=#b22222][b] {// code for IE6, IE5[/b][/color][color=#b22222][b] xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");[/b][/color][color=#b22222][b] }[/b][/color][color=#b22222][b]xmlhttp.onreadystatechange=function()[/b][/color][color=#b22222][b] {[/b][/color][color=#b22222][b] if (xmlhttp.readyState==4 && xmlhttp.status==200)[/b][/color][color=#b22222][b] {[/b][/color][color=#b22222][b] document.getElementById("livesearch").innerHTML=xmlhttp.responseText;[/b][/color][color=#b22222][b] document.getElementById("livesearch").style.fontFamily="Arial";[/b][/color][color=#b22222][b] document.getElementByID("livesearch").style.position="absolute";[/b][/color][color=#b22222][b] document.getElementByID("livesearch").style.top="500px";[/b][/color][color=#b22222][b] document.getElementByID("livesearch").style.left="500px"[/b][/color][color=#b22222][b] }[/b][/color][color=#b22222][b] }[/b][/color][color=#b22222][b]xmlhttp.open("GET","livesearch.php?q="+str,true);[/b][/color][color=#b22222][b]xmlhttp.send();[/b][/color][color=#b22222][b]}[/b][/color][color=#b22222][b]</script>[/b][/color]</head><body><div id="container"><div id="wb_Shape2" style="position:absolute;left:73px;top:142px;width:753px;height:44px;z-index:1;"><img src="images/img0026.gif" id="Shape2" alt="" style="border-width:0;width:753px;height:44px;"></div><div id="wb_Shape7" style="position:absolute;left:2px;top:28px;width:959px;height:578px;z-index:2;"><img src="images/img0027.gif" id="Shape7" alt="" style="border-width:0;width:959px;height:578px;"></div><hr id="Line1" style="margin:0;padding:0;position:absolute;left:437px;top:116px;width:442px;height:3px;z-index:3;"><div id="wb_Shape5" style="position:absolute;left:511px;top:63px;width:2px;height:44px;z-index:4;"><img src="images/img0028.gif" id="Shape5" alt="" style="border-width:0;width:2px;height:44px;"></div><div id="wb_Shape8" style="position:absolute;left:599px;top:56px;width:111px;height:66px;z-index:5;"><a href="./discover.htm"><img class="hover" src="images/img0029_hover.png" alt="" style="border-width:0;width:111px;height:66px;"><span><img src="images/img0029.png" id="Shape8" alt="" style="border-width:0;width:111px;height:66px;"></span></a></div><div id="wb_Shape9" style="position:absolute;left:712px;top:57px;width:98px;height:66px;z-index:6;"><a href="./learn.htm"><img class="hover" src="images/img0030_hover.png" alt="" style="border-width:0;width:98px;height:66px;"><span><img src="images/img0030.png" id="Shape9" alt="" style="border-width:0;width:98px;height:66px;"></span></a></div><div id="wb_Shape10" style="position:absolute;left:812px;top:57px;width:89px;height:66px;z-index:7;"><a href="./contact.htm"><img class="hover" src="images/img0031_hover.png" alt="" style="border-width:0;width:89px;height:66px;"><span><img src="images/img0031.png" id="Shape10" alt="" style="border-width:0;width:89px;height:66px;"></span></a></div><div id="wb_Shape11" style="position:absolute;left:592px;top:63px;width:2px;height:44px;z-index:8;"><img src="images/img0032.gif" id="Shape11" alt="" style="border-width:0;width:2px;height:44px;"></div><div id="wb_Shape12" style="position:absolute;left:706px;top:61px;width:2px;height:44px;z-index:9;"><img src="images/img0033.gif" id="Shape12" alt="" style="border-width:0;width:2px;height:44px;"></div><div id="wb_Shape13" style="position:absolute;left:805px;top:61px;width:2px;height:44px;z-index:10;"><img src="images/img0034.gif" id="Shape13" alt="" style="border-width:0;width:2px;height:44px;"></div><div id="wb_Shape4" style="position:absolute;left:517px;top:55px;width:81px;height:69px;z-index:11;"><a href="./form.htm"><img class="hover" src="images/img0035_hover.png" alt="" style="border-width:0;width:81px;height:69px;"><span><img src="images/img0035.png" id="Shape4" alt="" style="border-width:0;width:81px;height:69px;"></span></a></div><div id="wb_Shape1" style="position:absolute;left:436px;top:55px;width:81px;height:68px;z-index:12;"><img src="images/img0036.png" id="Shape1" alt="" style="border-width:0;width:81px;height:68px;"></div><div id="wb_Image2" style="position:absolute;left:64px;top:53px;width:334px;height:61px;z-index:13;"><img src="images/SWLavLogo.JPG" id="Image2" alt="" border="0" style="width:334px;height:61px;"></div><div id="Layer1" style="position:absolute;text-align:left;left:50px;top:36px;width:368px;height:96px;z-index:14;" title="Go home!"><div id="wb_Image1" style="position:absolute;left:11px;top:5px;width:344px;height:82px;opacity:0.00;-moz-opacity:0.00;-khtml-opacity:0.00;filter:alpha(opacity=0);z-index:0;"><a href="./index.htm"><img src="images/SW-Logo.jpg" id="Image1" alt="" border="0" style="width:344px;height:82px;"></a></div></div>[color=#b22222][b]<form>[/b][/color][color=#b22222][b]***<input type="text" id="Editbox1" onkeyup="showResult(this.value)" style="position:absolute;left:107px;top:139px;width:724px;height:41px;line-height:41px;z-index:15;" name="SearchBox" value="" autocomplete="off" placeholder="Start your search here" autofocus="autofocus" placeholder="Start your search here">[/b][/color][color=#b22222][b]<div id="livesearch"></div>[/b][/color][color=#b22222][b]</form>[/b][/color]<div id="wb_Shape6" style="position:absolute;left:787px;top:146px;width:53px;height:28px;z-index:16;"><img src="images/img0038.gif" id="Shape6" alt="" style="border-width:0;width:53px;height:28px;"></div></div></body></html> =====================================
  5. SPECIFIC QUESTION NOW AT HAND Here's a free home demonstration of the problem -- just type a in the search box. http://www.woofwoofwoof.org/is01/search.htm I've successfully inserted the following script in the <head> region of my html page, but I cannot seem to set the screen position of the results "box" to land anywhere near the input box. In the example on the w3school's site (http://www.w3schools..._livesearch.asp), the results appear neatly under the input box. A good thing. I first tried the code below without any of the lines marked with an *. The results appeared at the top of the page slightly left of center I added the lines with the * to no avail--still at the top and slightly left. As an aside, I was able to get the style.fontFamily to work just fine. <script type="text/javascript"> 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, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 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.fontFamily="Arial";* document.getElementByID("livesearch").style.position="absolute"; * document.getElementByID("livesearch").style.top="500px";* document.getElementByID("livesearch").style.left="500px"; document.getElementById("livesearch").style.border="1px solid #A5ACB2" } }xmlhttp.open("GET","livesearch.php?q="+str,true);xmlhttp.send();}</script> Thank you for all your time and help. DrC
  6. Sorry -- next to last paragraph should read "generate the XML file very day USING Access tables." DrC
  7. Dear Devoted Member and Foxy Mod, I'm going to blame both of you for this. So I sat down to dinner with my lovely (biologist/artist) wife tonight, and she said (out of the middle of nowhere), "Honey. There is something I have to tell you." And so I said, "Yes?" fearing who-knows-what. And she said, "You really are going to have to start saving your data XML files in UTF-8, whether you like it or not." So don't get any ideas that the two of you are brilliant or something. OK, so we never really had that conversation, but I did use Notepad (but not Notepad ++) to save the xml file in UTF-8. It worked like a charm (even with C/R's between lines to preserve formatting). Might I trouble you to help me do this encoding automatically? My Access database actually cranks out (a technical term) the HTML code for our website which allows a visitor to locate resources by choosing an "instant dropdown" tag (maybe a support group title, maybe an area of interest -- divorce, alcohol, etc.) Every day after I make changes in the database, I press the button and it produces the HTML and all I do is upload it. So far so good. To keep an "index" of "tags" that will appear in the instant search for the visitor to the website, I will have to generate the XML file every day as well as Access tables. I'm a bit confused on how to save this file with UTF-8 encoding. My searches on the web brought about fairly hairy suggestions using ADO -- I'd like to keep it as simple as possible (for stability sake and because I'm just beginning to use ADO and its friends). Oh yeah, I know that if all else fails I can bring my ANSI file into Notepad and save it as UTF-8, but that's no way elegant! Thank you so much! DrC
  8. Note: This part of the problem is solved. Please go down to the 11:38 am posting below to pick up what monster we face now. Here's the link to show you the problem -- results appear in the wrong location -- just type a into the search box. http://www.woofwoofwoof.org/is01/search.htm Greetings: I'm brand new at trying to wrangle PHP into cooperating so please forgive my being so wet behind the ears. On the W3School's site there is code for a PHP/HTML/AJAX instant search which I want to integrate into my site. The code is at http://www.w3schools..._livesearch.asp The code works perfectly on the website example itself, but after I take the three code snippets (HTML,PHP,XML) and transfer them all as is into one folder in each of 2 hosting services, I have trouble. On both hosts the "input" search box appears (just HTML), but when I enter a letter into the box here's the story: On GoDaddy I get the following error message: Warning: DOMDocument::load() [domdocument.load]: Input is not proper UTF-8, indicate encoding ! Bytes: 0xAE 0x20 0x2D 0x2D in /home/content/36/6182436/html/instantsearchtrial/links.xml, line: 1 in /home/content/36/6182436/html/instantsearchtrial/livesearch.php on line 3no suggestion On Earthlink I get the code produced "no suggestion" message which is the code's indication that it hasn't found the data in an xml file. I do know that GoDaddy no longer supports PHP 4 and I couldn't figure out if the PHP code is 4 or 5. What do you think I might be doing wrong? Any help you might have to help me integrate that code into our website would be grand. Our site helps the 450 visitors a day to our site find medical and other nonprofit resources; they are often sick or scared and so we want the process to be as simple as possible. Thank you. Dr. C.
×
×
  • Create New...