aspose file tools*
The moose likes JSP and the fly likes how to assign values from variables to form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to assign values from variables to form " Watch "how to assign values from variables to form " New topic
Author

how to assign values from variables to form

Rashmi Chawdhari
Greenhorn

Joined: Oct 08, 2012
Posts: 3
I want to assign values from varibles to textbox or any form control.
Suggest me jsp code
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

This site is to help you with your code and other related issues, not to give you THE code.
Search the same thing on google and write something on your own, if you face any trouble then post your code and we will help you out.
Dipakpsd Kumar
Greenhorn

Joined: Dec 08, 2011
Posts: 5
write a javascript function like:

fun(){
document.getElementById('textboxId').value = "abc" //<your value here may be string>
}

and call this function where you want.
Or you can give your textbox name as similar to the variable you are using in your action class or using in the bean.

To know more post your more details.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61628
    
  67

Dipakpsd Kumar wrote:write a javascript function like:

JavaScript is not necessary.

Simply assign the value to the element with the element's value attribute. E.g. <input type="text" value="${someValue}">


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: how to assign values from variables to form