TExt box change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lavanyak6
    New Member
    • Jan 2008
    • 2

    TExt box change

    I have written a code for textbox injsp

    <td><input type="text" class="textBox" name="potCommis sion" id="potCommissi on" size="10" value='<%=commi ssion%>'
    <% if(!commissionF lag.equals("NG" )){ %> disabled="true" <%}%> ></td>

    whenever the page loads the textbox contains the same value the user has typed in. I want it to be defaulted it to '0.00' whenever the page is refreshed. any inputs?
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by lavanyak6
    I have written a code for textbox injsp

    <td><input type="text" class="textBox" name="potCommis sion" id="potCommissi on" size="10" value='<%=commi ssion%>'
    <% if(!commissionF lag.equals("NG" )){ %> disabled="true" <%}%> ></td>

    whenever the page loads the textbox contains the same value the user has typed in. I want it to be defaulted it to '0.00' whenever the page is refreshed. any inputs?
    I don't know if this will work (due to me not knowing anything about how jsp works, but the <input></input> tag has a "value=" option that allows you to specify a default value for the text box. Give it a shot and see if that works for you.

    Regards,

    Jeff

    Comment

    Working...