JSP
Scenario:
Login page containing user id and pwd text boxes, each having a key boad button (onclicking the key board button will take to key.jsp where the user can input values in text box)
The keyed value in key.jsp text box should be returened to login.jsp in corresponding to the button clicked.(ie if user clicked useridtext box key board button then the value in key.jsp should be placed or if user clicked the pwd text keyboard button then the key.jsp text box should return the value to login.jsp of pwd field)

For further more understandings provided sample codings.
please help me.THANKS in advance

Login.jsp
<input type="text" name="name"  />    [user id text]
<img src="login.jpg" name="login" id="login" onclick="clicked('1')"/>   [Keyboard 1 for user id]


<input type="password" name="name" class="btn" />     [Password text]
<img src="pwd.jpg"  name="login" id="login" onclick="clicked('2')"/>   [Keyboard 2 for pwd id]


<script>
function clicked(x)
{
//..?
document.login.action="key.jsp"
}
</script>


********************Key.jsp
<input name="textfield" type="text"  />  [text box]


<img src="a.gif" onclick="type('a')"/>    [letter a]
<img src="b.gif" onclick="type('b')"/>    [letter b]
<img src="okbutton.gif" onclick="okay()"/>    [OK button]


<script>
function type(x){
var  object =document.getElementById("textfield");
var append = object.value;
object.value=append+x;
}


function okay()
{
// should return the value of text box to the coresponding text box of login.jsp
}
</script>

well, what you're using appears to be JavaScript, not Java. I would use Java and add the data to the session, to retreive it from the session later on

Thanks for your reply.
Please give me a solution in JAVA(Session)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.