Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how to display dynamic table using Ajax and JScript

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all Im thanks for give a chance to register in this site.

I want to display dynamic table when item change in drop down list using Ajax and java script.All ready I did some coding.It get Database details according to Drop Down List value.But problem is I cant create a dynamic table through java script function.please give a solution for my problem.


regards

MARKUL
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.

P.S. Could you also adjust your display name to be mixed case? Thanks!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to look into:

insertRow()
insertCell()

or

createElement()
appendChild()

Eric
 
Markul Lal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
You need to look into:

insertRow()
insertCell()

or

createElement()
appendChild()

Eric

 
Markul Lal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
You need to look into:

insertRow()
insertCell()

or

createElement()
appendChild()

Eric





thanks Eric..
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've often found that the complexities involved in adding/removing individual rows to a table far outweigh the cost of just regenerating the table itself. But you can still use Ajax. All you need to do is have a JSP fragment that just creates your table. When you need to add a row submit the data to the server via ajax and forward to your JSP with the table, popping the resulting HTML into a div.
 
Bear Bibeault
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
I've often found that the complexities involved in adding/removing individual rows to a table far outweigh the cost of just regenerating the table itself.


+1

I do this often myself. Make the server do the work!
 
Seriously? That's what you're going with? I prefer this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic