-
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
-
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.
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks