473,388 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Firefox not updating the DOM (I think)

I have a site that I am currently working on, with the development located at:
http://whathuhstudios.com/westside_dev/index2.php

The problem I am having is on the "find aid now" page. If you click "find aid now" a search filter comes up, and when a category is clicked, it runs another ajax function that filters the providers. In IE, it works like a charm. It's fast and easy.

Firefox however runs into all kinds of problems, and instead updates the innerHTML in the "body" div instead of the "resultscontainer" div that it is told to. It's much easier seen than explained.

If anyone has any insight into this, I would gladly pay you in $1,000 worth of Skittles.

This is loaded into <div id = "body">
Expand|Select|Wrap|Line Numbers
  1. <div style = "text-align:center;">
  2.         <p>Select the type of service you desire from the list of categories</p>
  3.         <p> 
  4.          <form name="formid" id = "formid">
  5.           <select name="service" size="10" multiple="multiple" onchange="javascript:prepare(); sndReq(checked_list('service',1), 'providerlist.php', 'resultscontainer');">
  6.             <option>Child Care</option>
  7.             <option.........etc......../option>
  8.             <option>Youth Services</option>
  9.           </select>
  10.           </form>
  11.         </p>
  12. </div>
  13. <div id = "resultsbox" style = "text-align:center;">
  14.     <div id = "resultscontainer">
  15.  
  16.     </div>
  17. </div>
This is the relevant javascript that is called:

Expand|Select|Wrap|Line Numbers
  1. function sndReq(request, ajax_file, targetid, ext) {
  2.         if (http.readyState) 
  3.             if (http.readyState != 4) return;
  4.             var requesturi = "ajax/" + ajax_file + request;          
  5.         http.open('get', requesturi, true);
  6.         http.onreadystatechange = function(){ handleResponse(targetid) };
  7.         http.send("");
  8.  
  9. function handleResponse(targetid) {
  10.     if(http.readyState == 1 ) {
  11.         document.getElementById(targetid).innerHTML = "<img src = 'images/progress.gif' title = 'loading' alt = '[loading]' / > <br/> Sending Request";   
  12.     }
  13.     if(http.readyState == 3 || http.readyState == 2) {
  14.         document.getElementById(targetid).innerHTML = "Receiving Data From Server";   
  15.     }
  16.  
  17.     if(http.readyState == 4) {
  18.                   if (http.status == 200) {
  19.                     var response = http.responseText;
  20.                      document.getElementById(targetid).innerHTML = response;     
  21.                     targetid = "";
  22.                 } else {
  23.                     alert(http.status);        
  24.                 }
  25.             } 
  26.     }
Apr 1 '07 #1
3 1643
drhowarddrfine
7,435 Expert 4TB
You have a lot of html errors.
Apr 2 '07 #2
You have a lot of html errors.
Umm.... thanks for that enlightening post....

The html isn't perfect or validated, but its pretty clean. If this is somehow relevant, please elaborate.
Apr 2 '07 #3
acoder
16,027 Expert Mod 8TB
What is the format of the response? I assume it is just HTML? You may need to override the mime-type, see top of this page.
Apr 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Dru | last post by:
Am I missing something simple? I can't figure this one out... <script language="JavaScript" type="text/javascript"> function showDesc(desc) { showDescription.innerText = desc; } </script> ...
5
by: BJ | last post by:
Hi, I add label and text box fields dynamically in code using C# and ASP.NET. I set the width of the label using: Label label = new Label(); label.Width = 20; label.Text = "Test";...
2
by: ars | last post by:
hi everyone i'm using some regular expression to paging, it work's fine in IE but not in Firefox i removed every thing to detect problem but i Can't , the only thing i got, is the innerHtml doent...
9
by: vighnesh | last post by:
Hi Folks Greetings to you all. I have been dealing a project, in which one of the requirement is to clear FireFox browser history programatically. Can anybody suggest me, how this can be...
6
Kimpossible
by: Kimpossible | last post by:
Hi, This is my first post. I'm trying to do a web site in all css for a change, I usually do tables. I'm starting from the top of the page and formatting as I go. The problem I'm having is with...
1
by: Lollygag | last post by:
Hi folks. Please try not to laugh at my web design noobness, I'm a photoshop monkey, but I thought I'd have a go at updating this website to learn css & html, it's far more complex than I'd...
2
by: honey99 | last post by:
Hi! can anybody tell me how to remove horizantal scrollbar for <textarea> in firefox,i think firefox takes horizantal scrollbar by default.....and i want to display vertical scrollbar for <textarea>...
2
by: honey99 | last post by:
I have a problem,that Onchange event is not working in firefox i think.......here is my code...shall i need to change anything ?? onchange='document.getElementById("abc").src=this.value' Thanks
5
by: rosaryshop | last post by:
I'm working a jewelry/rosary design web site at http://www.rosaryshop.com/rosariesAndKits2.php. As the user makes selections, it updates images of various parts, giving them a preview of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.