Jump to content

How to show values and pass other values associated with those values to URL?


baseballgraphs

Recommended Posts

Hello,

 

I am currently working on a project that allows people to search a table in my database, select a name from the database, and then get passed to another page where the name's id from the table in my database is used.

 

Here is the current code that I am dealing with: http://pastie.org/1147187

 

What I am doing is getting my two columns from my table, PLAYER_NAMES and PLAYER_ID. Then, using javascript, I am creating an autocomplete field where users can begin typing a PLAYER_NAME and select the player they want. However, I do not want to pass the PLAYER_NAME to the URL -- instead, I would like to pass the PLAYER_ID to the URL.

 

How can I improve my code so that when a user selects a player value the player's ID is passed through to the URL using javascript?

 

I would seriously appreciate any help.

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.