473,378 Members | 1,580 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,378 software developers and data experts.

innerHTML, AJAX and Firefox

1
I have an application with a form that has two parts : A & B.
A should be a static form while B shoudl be dynamically loaded via AJAX/PHP.

Using a select box on part A, the onchange event calls an AJAX PHP script that generates PART B (in HTML)
On positive AJAX reply, Part B's HTML is replaced by the returned HTML (using innerHTML)
Works perfect on IE, but not on FF.

On FF, the new form is properly displayed, but when trying to submit the form, the input data is not recognized.

I know that IE supports innerHTML with no problem, while FF has some issues.
However, I would like to get Part B from PHP using AJAX as maintenance will be easier as Part B might have many versions.

Any idea will be greatly appreciated.

Thank you

Coby
Apr 30 '07 #1
4 4468
acoder
16,027 Expert Mod 8TB
Welcome to TSDN.

Can you post your code.
May 1 '07 #2
drupal
1
i am also using the ajax/php/innerhtml

the ajax file i am using is,

ajax.js
/////////////////////////////////////////////////////////////////////////////
// JavaScript Document
var isMinNS4 = (document.layers) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;

function get(flag)
{

var urlall="user/register/myrole";
http.open("GET",urlall, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function handleHttpResponse()
{
if (http.readyState == 4)
{
results = http.responseText;
alert(results);
document.getElementById("mydiv").innerHTML = "";
document.getElementById("mydiv").innerHTML = results;

}
}
function getHTTPObject()
{
var xmlhttp;
/*@cc_on
@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@else
xmlhttp = false;
@end @*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}


var http = getHTTPObject(); // We create the HTTP Object

///////////////////////////////////////////////////////////

here also i have issue of FF., it works fine in IE but not working in FF, in FF it will taking whole layout again.

please rovide the help, if possible.

thank you
May 22 '07 #3
acoder
16,027 Expert Mod 8TB
Try using a better version provided in the AJAX tutorials in the Offsite Links thread at the top of this forum.
May 22 '07 #4
drhowarddrfine
7,435 Expert 4TB
innerHTML is not part of any standard but this may help.
May 22 '07 #5

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

Similar topics

2
by: sveinn | last post by:
Hi all, I've read through this group searching for an answear about this problem. Few have come close but not quite what I need. My problem is this: I'm using Ajax to fetch a new table with...
8
by: Clément | last post by:
Hi! I am currently developping a user interface with Ajax/C#/.net. And I am facing a problem with Mozilla, and Firefox. I use the function innerHTML to load a Web UserControl into a div, this...
4
by: tcole6 | last post by:
My problem appears to be Firefox specific. I have a hyperlink that loads a new window. This window contains hyperlinks that call javascript functions in the parent window and then closes the...
6
by: sonic | last post by:
Ok, i am sure everyone is sick of hearing about this. but i've checked about 10 different posts/sites about this issue, and they all say "use DOM" but i think there is more to be said. Perhaps I...
17
by: PJ | last post by:
Greetings... I have stumbled upon a small problem. I use Ajax to retrieve part of a page I need to update. I update a DIV element with the HTML contents I get from another page. It works...
2
by: m0nkeymafia | last post by:
I have spent the past few weeks trying to figure a way around this problem, and have yet to find a good enough solution. Internet Explorer leaks memory when I update a div container using...
5
by: pjdeklerk | last post by:
I have a web page which has javascript which uses the innerHTML property of a <TD> object to replace that table cell's contents. The contents are of the form...
1
by: Robin | last post by:
Martin wrote: .... You appear to be putting the responseText into DIV 'htmlText' then 'hiddenDiv'. You therefore have two DIVs with id 'divslct4' (not legal as IDs are supposed to be...
6
omerbutt
by: omerbutt | last post by:
hi there i have a registration page on which i have a captcha verification method i customized that code for the sake that the user is able to refresh the captcha images by staying on the same page...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.