• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can not get the values from textbox

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am able to retrive the value of a textbox using scriplets.

<form name="frmdisplay">
<input type="text" name="txtFileBrowse" value=" ">
<% String fileName=request.getParameter("txtFileBrowse"); %>
<input type="text" value="<%= fileName%>" name="test">

i am getting only null value.

thanx in advance :roll:
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ramya,

looking at the problem i understodd why null is coming bcoz for the first time the page is loaded there would be no txtBrowseFile parameter so it returns null and ur assinging the value to the text field

further u can reply
 
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ramya reenu:
I am able to retrive the value of a textbox using scriplets.

<form name="frmdisplay">
<input type="text" name="txtFileBrowse" value=" ">
<% String fileName=request.getParameter("txtFileBrowse"); %>
<input type="text" value="<%= fileName%>" name="test">

i am getting only null value.

thanx in advance :roll:



Thats exepected behaviour. You are trying to read a parameter from request object but not from the text box, so it wont work. And you can not do it with Java code to read a text box value and assign that value for another text box. You need use Javascript code.
 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sathish,

i am passing a value to the textbox from another frame dynamically and i able to view the value in the texbox but not able to get the in java.

How can i do it.
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ramya reenu:
sathish,

i am passing a value to the textbox from another frame dynamically and i able to view the value in the texbox but not able to get the in java.

How can i do it.



YOu can do it in java using request object until unless you submit the form.
 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Reddy,

thank you. then i will try doing it in javascript and then get back.
 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi reddy,

thank u.
it is working now.


ramya
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ramya reenu:
hi reddy,

thank u.
it is working now.


ramya



Thats good. Thumb rule is you can mis html code with Java but not Java code with html.
[ February 23, 2006: Message edited by: KJ Reddy ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic