0

i'm driving insane right now

i have a form wich has a lot of stuff in it
as you fill it, javascript generates the OPTIONS[] for four SELECT objects at the end of the form.
they are generated right and i have no troubles up to this point until...
i clic the SUBMIT button

i need to upload to a database (already created) ONLY the selected OPTIONS VALUE for each SELECT

the point here is
how do i retrieve it?

my SELECTS are called listX (list1-list4)
assuming the available OPTIONs are: right, left, blink, on, off,
with values s0, s1, s2, s3, s4

if someone picks
list1: left
list2: off
list3: right
list4: blink

how do i get the corresponding s1, s4, s0, s2 to upload them to the database??

i thought about this
String choice=request.getParameter("listx");
but that oddly returns either null, true or false; and
String[] choice=request.getParameterValues("listx");
returns weirder stuff (string java lang @ numbers letters numbers)

so of course i can't proceed to upload the information if i cant even get it right

admin.html is the webpage, among other stuf it has

<form id="form1" name="form1" method="post" onsubmit="validate()" action="manager.java">

and manager.java is the one using a
db1.mdb resgistered as proyect
which contains two tables

so, can anyone gimme ideas?
thank you.

2
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by Airshow
0

Vitro,

I suggest you first make a test page with hard coded HTML to eliminate any client-side uncertainty:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Airshow :: Untitled</title>
<style type="text/css">
{}
</style>

<script>
</script>
</head>

<body>

<form id="form1" name="form1" method="post" onsubmit="" action="manager.java">
<select name="list1">
	<option value="s0">right</option>
	<option value="s1">left</option>
	<option value="s2">blink</option>
	<option value="s3">on</option>
	<option value="s4">off</option>
</select>
<input type="submit" value="Submit">
</form>

</body>
</html>

Then see if your script picks up list1 from the request.

Airshow

0

Vitro,

I suggest you first make a test page with hard coded HTML to eliminate any client-side uncertainty:

Then see if your script picks up list1 from the request.

Airshow

oh my ...
it works...
it works with this simple code
but when i try it with mine, it displays "null"
so
the problem is somewhere in the javascript that generates those lists

gonna check on that now
thanks.
i'll post again after a few tests if it still doesn't works...

0

the problem is somewhere in the javascript that generates those lists

Yup, it certainly seems so.

Airshow

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.