File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to format when i enter number on textbox see code

 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<fmt:formatNumber type="currency" value="12345.6789"/></p>
<input type = "text"/>

this one is working if i set value in fmt but what i want to happen is when i enter a number in textbox it will be fommated on the format that i want thanks so i think i need to an of og text and set it into value of fmt? my plan is when i enter a number in textbox it will automatically formated thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chrstian ferma wrote: my plan is when i enter a number in textbox it will automatically formated

Not with JSP. JSP executes on the server long before the page is sent to the browser. You'll need to use JavaScript.

Please read this article to understand how JSP works.
 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you, so i will make a function that will get every number that i enter and autoumatically format it and set it to UI? my plan is the number is formatted already when i input it on textbox before i click the button thank you
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic