Link to home
Start Free TrialLog in
Avatar of posh020
posh020

asked on

How to fill in a text input box with a specified value?

Hi folks,

Suppose I have the following in my JSP page.

    <form action="myform.jsp" method="post">
 
    Type Your Value:
      <input type="text" name="yourval" size=35
            value="${fn:escapeXml(param.yourval)}">
       <font color=red>${fn:escapeXml(yourvalError)}</font>

    </form>


The above will give me a text box where I can type some value.
But it will be a blank text box.

I want the text box to have an initial value that shows inside the text box, like "123".
How can I do this?

Also, I want to call <jsp:getProperty name="mybean" property="yourVal" />
and put the value returned by this call, inside the text box as the initial value.

How can I do this?

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of raj3060
raj3060
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial