Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

static and dynamic portion  RSS feed

 
Anu Pasricha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My HTML page contains some static portion and some dynamic. I want to control my static portion with javascript and rest with servlet. eg. I have a form in which i have some text boxes and some buttons like next, prev, delete etc. I want to disable or enable buttons using javascript and populate the text boxes with database. Presently i am writing the whole code in servlet and throwing it on client side using out.prinltn. I am calling the same servlet on the form action. So everytime new HTML page is built. Even the static buttons are rebuilt. The problem i am facing is that i m writing javascript to disable some buttons on click of a particular button. It is happening perfectly ok, but after disabling it for a moment, it again rebuids the HTML and again builds the enabled buttons.
How should i go bout implementing the same.
Bye
Regards
Anu
 
Mark Fletcher
Ranch Hand
Posts: 897
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anu,
Have you considered just using a JSP page? This would be far easier to maintain.
Mark
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi:
why don't you generate the entire form from jsp/servlet?
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can be the problem of the Javacript you are using. Please post the code in HTML/JS.
 
Sam Walker
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here�s another thought. If your html page is getting refreshed then everything will be reinitialized with their default values.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!