SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast Setac's Avatar
    Join Date
    Nov 2000
    Location
    San Marcos CA
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Table with form getElementByID no find

    I thought I would use Ajax to process a form. Post all the form data to a page, server side process and return a copy of the original table with error messages, allow correction and post again until correct.

    I use DW's MM_FindObj to capture the form data and build a post string. Works fine first pass. The problem is getElementByID and DW's MM_FindObj() cannot find the INPUT fields after the table/form is replaced.

    I just replaced everything inside a DIV that holds the table/form. I did a simple "targetDIV.innerHTML =" to make the replacement.

    Once the form is replaced, I cannot find the elements.

    What am I missing?
    Dynamic HTML - Is that a Frisbee based language...

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Setac View Post
    I just replaced everything inside a DIV that holds the table/form. I did a simple "targetDIV.innerHTML =" to make the replacement.

    Once the form is replaced, I cannot find the elements.

    What am I missing?
    You must re-create the form using DOM methods.
    Tab-indentation is a crime against humanity.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •