inserting tables w/o refreshing the page?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: inserting tables w/o refreshing the page?

  1. #1
    Join Date
    Jun 2004
    Location
    Philippines
    Posts
    3

    Question inserting tables w/o refreshing the page?

    pls help me.

    what should i do if im going to click a button and then a row will be inserted into the table without refreshing the page.
    esalvador

  2. #2
    Join Date
    Apr 2004
    Posts
    100
    I need to know the context. are you talking about JTable controls in Java? or are you talking about Tables in HTML/JavaScript?

    If you are talking about HTML/JavaScript (which sounds like it to me), then you must use Dynamic HTML. I don't remember the exact syntax, but here is the idea:

    1. surround your <TABLE> </TABLE> element with tags like <DIV id="mytable"> </DIV>

    2. in your java script, keep an array of the contents of the table.

    3. every time you make change to the array, you probably need to rewrite the entire table. Just form the code into a string.

    4. the rewrite part is something like

    document.mytable.innertext = newTableString;
    where newTableString is the new table code in HTML

    5. IE and Netscape probably have different syntax on the dynamic rewriting part... you need to check to make sure.

  3. #3
    Join Date
    Apr 2004
    Posts
    100
    oh, one last thing. this is a Java forum. If you have a question about JavaScript, you are better off posting it in the WEB forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center