File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Textfield border disappears after validation

 
G Fior
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a textfield with a border set to none to start with. It's the usual black border. When we validate the form for errors, if the user entered data that was incorrect, the textfield border is displayed in red. However, when the user corrects the data, clicks out the red disappears but the border is missing or not black again unless the page is reloaded. Anyone has any suggestions on how this can be fixed without reloading the page? We can reload the page or all the form will lose the input data. Thank you.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how are you reseting the border back to normal?
 
Kuldeep Vaishnav
Ranch Hand
Posts: 72
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if this is on the target.But i am assuming that you are making the red border go away on entering the right entry somewhere in javascript.Can we not make the border black in the same code segment?

Discard if i am wrong or did not understand the situation correctly..just trying to throw some pointers here.
[ August 03, 2005: Message edited by: Kuldeep Vaishnav ]
 
G Fior
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I want to set it back to black the minute the user corrects the data in the box it should turn back to it's original state, ie black and thin. When I do an alert on the original border it gives me an empty string which it looks like the border used is NONE but then why does it show up on the form? Next, when I set my border to solid you see it. But how can I make it just thin as the original one? I tried to set the width to black 1 px and it doesn't seem to work. Any ideas? Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Example of changing the border color

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic