Connecting Tech Pros Worldwide Help | Site Map

DOM problem in Mozilla

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2006, 02:05 PM
sandipm
Guest
 
Posts: n/a
Default 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


  #2  
Old July 19th, 2006, 02:45 PM
marss
Guest
 
Posts: n/a
Default Re: DOM problem in Mozilla


sandipm написав:
Quote:
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.

  #3  
Old July 19th, 2006, 02:55 PM
marss
Guest
 
Posts: n/a
Default Re: DOM problem in Mozilla


marss написав:
Quote:
sandipm написав:
Quote:
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";

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.