User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Mar 2008
Posts: 3
Reputation: kselvakumar_82 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kselvakumar_82 kselvakumar_82 is offline Offline
Newbie Poster

Passing Value to other JSP

  #1  
Jul 4th, 2008
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>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 136
Reputation: stultuske is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 15
stultuske's Avatar
stultuske stultuske is offline Offline
Junior Poster

Re: Passing Value to other JSP

  #2  
Jul 4th, 2008
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
Reply With Quote  
Join Date: Mar 2008
Posts: 3
Reputation: kselvakumar_82 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kselvakumar_82 kselvakumar_82 is offline Offline
Newbie Poster

Re: Passing Value to other JSP

  #3  
Jul 4th, 2008
Thanks for your reply.
Please give me a solution in JAVA(Session)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Java Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 7:39 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC