•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 397,836 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,571 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 345 | Replies: 2
![]() |
•
•
Join Date: Mar 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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>
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>
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
Similar Threads
- Help for learnign JSP (JSP)
- how can i pass a value from java script to JSP scriplet (JSP)
- Passing variable value from javascript to jsp page at run time (JSP)
- passing values of Select box from JSP to Action class thru form Bean (JSP)
- Passing values to a url and storing in database (JSP)
- how to call javabean from jsp page upon onChange event (JSP)
- Passing paramter from javascript to jsp (JavaScript / DHTML / AJAX)
- Passing arguments to jsp file (Java)
Other Threads in the Java Forum
- Previous Thread: Drawing a dashed line
- Next Thread: My Big Problem


Linear Mode