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

DOM problem in Mozilla

Hi all,
I am facing problem with updating form element using javascript in
MOZILLA
Details are as follows.
I have a div containing form element. on submit , i am submitting the
form using javascript-ajax and processing the form. then after
successfully processing i am replacing innerHTML of div with same
form. I am able to see same form on page after ajax update but when i
refill the form and submit it again..javascript is not able to find the
form element in HTML DOM.

This problem comes with mozilla-firefox but it works fine with IE 6

Can anybody help me with this?

Regards,
Sandip More

Jul 19 '06 #1
2 1606

sandipm написав:
Hi all,
I am facing problem with updating form element using javascript in
MOZILLA
Details are as follows.
I have a div containing form element. on submit , i am submitting the
form using javascript-ajax and processing the form. then after
successfully processing i am replacing innerHTML of div with same
form. I am able to see same form on page after ajax update but when i
refill the form and submit it again..javascript is not able to find the
form element in HTML DOM.

This problem comes with mozilla-firefox but it works fine with IE 6

Can anybody help me with this?

Regards,
Sandip More
Merely supposition.
Try to replace not form but only its content:

Instead of
<div id="outerDIV">
<form id="frm">
.....
</form>
</div>

try
<form id="frm">
<div id="innerDIV">
.....
</div>
</form>

and replace document.getElementById("innerDIV").innerHTML
Maybe it helps.

Jul 19 '06 #2

marss написав:
sandipm написав:
Hi all,
I am facing problem with updating form element using javascript in
MOZILLA
Details are as follows.
I have a div containing form element. on submit , i am submitting the
form using javascript-ajax and processing the form. then after
successfully processing i am replacing innerHTML of div with same
form. I am able to see same form on page after ajax update but when i
refill the form and submit it again..javascript is not able to find the
form element in HTML DOM.

This problem comes with mozilla-firefox but it works fine with IE 6

Can anybody help me with this?

Regards,
Sandip More

Merely supposition.
Try to replace not form but only its content:

Instead of
<div id="outerDIV">
<form id="frm">
.....
</form>
</div>

try
<form id="frm">
<div id="innerDIV">
.....
</div>
</form>

and replace document.getElementById("innerDIV").innerHTML
Maybe it helps.
Or else

var newForm=document.createElement("FORM");
......
//recreate form content
.......
newForm.style.display="none";
existingForm.parentNode.insertBefore(newForm, existingForm);
existingForm.parentNode.removeChild(existingForm);
newForm.style.display="block";

Jul 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Neil Zanella | last post by:
Hello, I just ran into an interesting problem with cookies while using PHP 4 and Mozilla 1.6. Basically, I have been using PHP on a site called: foo.bar.net?script.php Within that script I...
4
by: Jakub Fast | last post by:
Hi, Does anybody know how far you can get nowadays with trying to use Python as the script language for XUL instead of JS? Is it possible (even theoretically) to write full-fledged applications...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
2
by: Peter | last post by:
Hello, First of all, sorry for all the code. I don't know how to explain my problem without it. I have a javascript function which can build a webpage dynamically. A striped down version of...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
3
by: Jim Ley | last post by:
Hi, It seems the mozilla guys have chosen another (almost certainly poor choice in my initial thoughts) of having document.all evaluate to false, but document.all catch the chicken event - also...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
20
by: Thorsten Kampe | last post by:
Hi, I've already sent this to the Komodo mailing list (which seemed to me the more appropriate place) but unfortunately I got no response. I'd like to build a Python GUI app. Neither Tkinter...
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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.