aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes get textbox val at the time of url click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "get textbox val at the time of url click" Watch "get textbox val at the time of url click" New topic
Author

get textbox val at the time of url click

Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
Hi,

I want to be able to send the value entered in a text box as a request parameter appended to the url is it possible.
I have done some thing like this please let me know what I am doing wrong here.


Please let me know if I could do it this way also please suggest me if there is another way, all I want to do is prepopulate the values entered in the login page in the registration page without the user having to enter the username again in the registration page.

Thanks,
Samanth.
Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
Just realized I was not returning a value but I still do not get anything even after returning the value.

Thanks,
Samanth.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

What made you think you could write script inside an href attribute? You'll need to establish a click handler to handle the click yourself. Why aren't you just submitting a form rather than trying to use a link?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
I am a quite new to javascript. I just wanted to know if that is possible at all. We have a submit button for login. since the webpage would be displayed on a mobile device we have thought of not having a submit for registration.
Just wanted to know if there is any other way of doing it using java script in you knowledge.

Thanks,
Samanth.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Originally posted by Samanth Marisetty:
I am a quite new to javascript. I just wanted to know if that is possible at all.
Of course it is. But first you've got to learn the where and how of scripting pages.

We have a submit button for login. since the webpage would be displayed on a mobile device we have thought of not having a submit for registration.
I'm not following that logic. Why is a submit ok for login, but not anything else? When submitting data, a form is easy becasue it handles the details of the data submission.
 
jQuery in Action, 2nd edition
 
subject: get textbox val at the time of url click
 
Similar Threads
Not Getting Values using EL in Spring..
Need Help on HTML
Spring MVC-iBATIS problem with updating data from the form
Images are not coming in JSP pages
Where do i place the .class files?