• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

static and dynamic portion

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 897
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anu,
Have you considered just using a JSP page? This would be far easier to maintain.
Mark
 
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi:
why don't you generate the entire form from jsp/servlet?
 
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can be the problem of the Javacript you are using. Please post the code in HTML/JS.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
straws are for suckers. tiny ads are for attractive people.
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic