Hi All, I have a jsp(1) where a user populates some fields for input into a database. Before they complete this page there is a search button that when clicked brings up jsp(2) which runs a search of company names and brings back a list. I want the user to be able to click on any of the company names in the list and upon doing so the popup, jsp(2) closes and populates the jsp(1) with the name. I have been able to do this with a single text box but have been unable to do it with a list. Can someone take a look at my code and point me in the right direction? Thanks!
one thing I see is document.all That is a no-no, should be doucment.getElementById('theId')
You are passing back search, what is search does not seem to exist anywhere. Plus you link has nothing inside of it, it will not show up.
Why bother passing all of these ids around in the first place. You are looping through this table, add the data to be passed inside your function call
I would change your other function like this....
Joined: Jan 04, 2005
Hi Eric, Thanks for taking a look at my code. Ignore the other vars the only one I am passing is the organization (I just haven't cleaned up the code yet). The problem I am having is that when I select from the list brought up by jsp(2) it populates jsp(1) with an "undefined" rather then the organization selected. I believe my problem my lie with "search" as I need to identify the object in the list???
Joined: Nov 08, 2001
your search is not pointing to anything, take my advice and when you are building the table, output the value where your search should go. One less reference to pass around.