473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Javascript - Java list menu

1
Hi,

I am retrieving a selected item from a list/menu component on an
HTML page. The said value is passed as a parameter to a method
initiated through <jsp:useBean.


I am aware that when the user selects an item from the list/menu an
onChange event is triggered. I have handled this event by a javascript
function.


The table is populated according to the selected item, and therefore I have used the following syntax in order to populate an already defined table 'tblResults': var x=document.getElementById('tblResults').insertRow( );

Before populating each row I need to retrieve the data using the method <% outResult = result.getResult(xxx);%>, where results is the object declared by the <jsp:useBean. The xxx refers to a variable pointing to the HTML list/menu. I am able to call this method through the use of scriptlets. When I pass a value instead of xxx the process works correctly and the data is loaded into the database, however I cannot find a way of how I can pass the variable. I attempted to use

I would appreciate your kind help

Happy Christmas and thanks
Dec 24 '09 #1
2 2350
RamananKalirajan
608 512MB
Have a input type hidden in ur html and set the value when the select is changed. You can access that input value using request.getAttribute("hidden field name ")

Thanks and Regards
Ramanan Kalirajan
Dec 28 '09 #2
acoder
16,027 Expert Mod 8TB
You're mixing up Java/JSP and JavaScript. One is server-side and one is client-side. If you want to use both without a page reload, use Ajax.
Dec 30 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
10
by: John Ortt | last post by:
Hi Everyone, I have created a Javascript menu for my site which uses frames. The first stage loads fine but I want two drill down menus ("About Me Menu" and "Projects Menu"). The pages load...
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
0
by: Phl | last post by:
hi, does any know why my javascript dropdownlist in my user control will only appear if I have my code as follows: // create an instance of the user control Control UCAdminDDMenu =...
4
by: -Lost | last post by:
I cannot for the life of me remember the site name, but I believe it was the site of one of the regular posters here or perhaps in comp.lang.java.javascript. Anyway... The site in particular...
3
by: BlueroY | last post by:
hi, I'm working on an exercise, i did a lot of work already and i just can't figure where I'm going wrong, this is what I'm trying to achieve Sample IO...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.