473,804 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strange ajax behaviour in firefox 3.0.4

82 New Member
Hi

I am running ajax call to my appache local server on my development server, which is also my testing server, I run the site from the server (the server running php,mysql), what I get back is a list from the server and than I use innerHTML to plant it into the page.

Expand|Select|Wrap|Line Numbers
  1.   select id="'modelName'" style="width:130">
  2.  
  3.                 <option value="none"  selected>none</option>
  4.  
  5.            </select>
  6.  
The issue is that the method is working in IE6, Opera ver 9.62, Safari ver 3.3. But when I come and run it on FF 3.0.4 I can not see the list box. I ran the firebug and I see actually that the ajax call was done and the list box was created but for some reason it refuse to insert it into the DIV(I did not got any error from the firebug), I know it ran from me with firefox 2, now is something change in FF and I don't now why. I thought this is a cross connect issue but I don't get any indication from the firebug can someone please advise.

Thanks
Ronne

.
Nov 23 '08 #1
6 1988
rnd me
427 Recognized Expert Contributor
I am surprised to hear this works for IE.
innerHTML is not the best way to populate options.

try using a wrapper span around the select tag, and reinstering the whole select tag instead of just the options.
Nov 23 '08 #2
raknin
82 New Member
rnd me,
Thanks for your reply, it works great but for some reason it stop for FF3.0.4. I think it some kind of security in FF issue that disable it from being showing, since I run my FF on the server, maybe it is the FF cross domain issue.
Nov 23 '08 #3
drhowarddrfine
7,435 Recognized Expert Expert
This line might be the problem:
select id="'modelName' " style="width:13 0">

Change it to:
select id="modelName" style="width:13 0px">

Perhaps your extra quotes above are still needed but need to be escaped? Plus, you don't have any units on the width, which is required.
Nov 23 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
@raknin
This would only be a problem if it was actually from another domain, and then it wouldn't work in other browsers either.

Show the code where you set the innerHTML, and is the code returned from the PHP page exactly as you posted in your first post?
Nov 24 '08 #5
raknin
82 New Member
Acoder,

The function that perform the ajax call is:

Expand|Select|Wrap|Line Numbers
  1.  
  2. function GetXmlHttpObject(divID,url)
  3. {
  4.   xmlHttp=XmlHttpObject();
  5.  
  6.  if (xmlHttp==null)
  7.  {
  8.    alert("Your browser does not support AJAX!");
  9.    return FALSE;
  10.  }       
  11.    xmlHttp.onreadystatechange = function() 
  12.    {
  13.      if (xmlHttp.readyState == 4 && xmlHttp.status==200) 
  14.      {           
  15.         document.getElementById(divID).innerHTML=xmlHttp.responseText;
  16.      }else
  17.      {
  18.         alert('false');
  19.      }
  20.    }
  21.      xmlHttp.open("GET", url,false); 
  22.      xmlHttp.send(null);
  23.  
  24. }
  25.  
  26.  
and the returned list box from the server is as I posted before.
Nov 25 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
Hmm... You're making a synchronous request, so there's no need for onreadystatecha nge. Just put the function code below send().
Nov 25 '08 #7

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

Similar topics

2
1287
by: niels.froehling | last post by:
Hy; I converted the tables (for _tabular_ :) data) in a project from the plain <table><tr><td></td></tr></table> structure to seperation into head/foot/body divisions (not the <div>-element). Now I get a strange behaviour in FireFox not obeying the given sizes anymore, but not in all cases. It seems that when there are elements with explicit 100%s within tbody-cells they hijack the table-sizes. I mean I would understand that when I...
5
20092
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great with Firefox,but with IE6 the onFailure never gets called and the request never completes. My code: var ajaxReq = new Ajax.Request( url, {method: 'post', parameters:
4
7479
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole new page that should replace an existing one. I.e when we issue an Ajax request we don't know what will be returned and analyze the response to act accordingly. Now, the way to replace the current document with a new one used to be easy and...
2
1238
by: Aggelos | last post by:
Hello, I am trying to export/import about 50.000 records in a csv file which a user can upload or downlaod from the browser. The problem is once I hit export Firefox comes with a dowload myscript.php window and IE just page cannot be found. It doesn't happen with less records. I tryied to google the problem but it doesn't seem to get me anywhere. Also I have memory problem because I create huge associative arrays that keep all those data...
4
7712
by: ext237 | last post by:
Simple ajax call seems to have some issues in Firefox. The "onComplete:" is called BEFORE the response is returned by the call. Is there a coding issue or a work around? var ajax = new Ajax.Request( url, {method: 'post', parameters: params, onComplete: evalInfo }); function evalInfo( request ) { // do stuff with request
17
11888
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);" onclick="show('ajaxrequest.php?action=removefield','div1');show('ajaxrequest.php?action=reloaddiv2','div2')">verwijderen</a> While both seperate actions work they dont when I put them together. Anyone know how to fix this ? My ajax.js with funcition show
7
1356
by: adrive | last post by:
hi guys, I'm new to ajax and i'm just following the examples from tizag and w3schools. Apparently, an application i'm trying to build is showing very peculiar behaviour. I have a <span> section where it'll actually list out all my subject titles dynamically after a record has been inserted. However, it doesn't always list out all items with the latest added subject. BUT if i put an alert() before it loads the list, i won't have this...
3
3514
by: sarika | last post by:
Hi all I m making a website in which i have used ajax technology . When i make a page request throght ajax it works fine in IE but giving problems in Mozilla .In mozila i m getting 403 status code with"Error 403 "Access Denied/Forbidden"" . Though same script is working fine in mozilla when run through other server. Please reply asap.
4
1739
by: Carlo Chiari | last post by:
Hi devs, in my application I need to update a simple text file every time the user checks an item of a radio group. I use AJAX method to do this stuff. In the start page I have this code for evely row: <td><input type="radio" name="CheckMe" onClick='UpdateRecipeID(3);'/></ td>
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.