Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem transfering info using a radio button

Status
Not open for further replies.

dexter195

Programmer
Jun 18, 2003
220
EU
hi,
im trying to transfer information from one jsp page to another.

im using a radio button to select the appropiate information and a submit button to transfer the selected username to another jsp page. that username will be used to perform a query on the database.

at the moment i can only transfer a string

Code:
<INPUT TYPE="radio" NAME="adminUsername" VALUE="bob">

what i want to do is send the value of username within an object.

eg: adminOutput.getUsername();

ive tried

Code:
<INPUT TYPE="radio" NAME="adminUsername" VALUE="<% adminOutput.getUsername(); %>">

but no information is being transfered. the data can be extracted from the above object so the info is there.
 
hi

can you explain me the exception?....

i wont update my text

neutext.setThema(thema);


TextVerwalter textVerwalter = TextVerwalter.getInstance();
textVerwalter.updateText(neutext);


_____________________
in database there is an methode for update text thema:

"themen_id = '"+Integer.parseInt(text.getThema())+"'

_____
everytime i get the error
For input string: "Herkunft / Lebenssituation"



what shall i do?can u pls help me.................


thank you
 
the error
For input string: "Herkunft / Lebenssituation"

when using Integer.parseInt

most likely means you've passed string data that cannot be parsed into an int, in this case most likely the string "Herkunft / Lebenssituation"


-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
but when i didnt parse the thema in integer ,
it also doesnt work.

than i have a jasper exception

i dont know what to do

please......................................
 
you can't pass a string like "Herkunft / Lebenssituation" or "foo bar" or "hello world" to Integer.parseInt(). if you do it will throw a NumberFormatException

you can only pass a string containing a parseable integer like "234" to Integer.parseInt() or it will throw a NumberFormatException



-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
Hi JSP Experts,
I have retrieved a column from a database table. Its valid valus could be null or 0 (zero).

on my jsp page, I have two radio buttons for this column ON and OFF. If the value is null, my ON radio button is checked and if value is 0(zero), than my OFF radio button is checked. Up to this point is fine, and its working fine.

The problem arise as here:

if the current value is 0(zero) and OFF radio button is checked BUT if the user selects ON radio button, its value must be assigned to null and passed to Update.jsp file. On Update.jsp file, I'm looking radio button value whether it is varMsON or varMsOFF before I write its value to table. My code is something like this.

if (varUpdMs.equals("varMsON"))
{
varUpdMs = null;
}
else if (varUpdMs.equals("varMsOFF"))
{
varUpdMs = "0";
}

Now this time around the varMsON value i.e. null saved to table. When I saved the record, and referesh the main jsp page, the value should be showing me as null i.e. my ON radion button should be checked but still showing OFF radio button checked. I'm displaying values from table, its value showing null but radio button still showing OFF checked.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top