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.

Recommended Answers

All 3 Replies

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

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...

the problem is somewhere in the javascript that generates those lists

Yup, it certainly seems so.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.