PDA

Click to See Complete Forum and Search --> : get selected value?


joey o.
Oct 30th, 2000, 11:08 AM
Hi,
I'm using "index" as my value in my dropdown box which is populated from a column in a database and client-side javascript to navigate it.The javascript selects the selected-value depending on the index. Now my problem is when I want to send the selected-value to the database or request it to another page I only know how to refer to it's "value" not the selected value. Also Because this is client side scripting I don't know how to pass any relevent(or irrelavent)variables out of the script within the <head> tags and into the body of the page or calling page. I'm using Visual Interdev. Please help.

monte96
Oct 30th, 2000, 03:03 PM
Not quite sure I followed that...

gsc1ugs
Oct 31st, 2000, 09:37 AM
I am trying to add a session object to my incoming paramters
ie: i have a generic page generator that and a language parameter on the incoming page so as to direct me to the correct database

if nLang = "eng" then
session("Language") = nLang
strProvider = "DSN=engdata"
end if


can anyone tell me how to get the incoming string each time the session is live?

Many thanks and probably very confused.

monte96
Oct 31st, 2000, 03:11 PM
gsc1ugs: Please post your questions in your own thread.

1. You can access the text data with the innertext property, but only on the client side. The only way to pass it to the server is to put it into a FORM element and pass it on submit or call your page with a querystring. If you need the info in the text passed, put it in the value attribute. Even if you have to put multiple values, you can separate them with hmm..lets say a pipe | and separate them in your page that that is being submitted to.

2. If you want to do what your asking, you should create a hidden input element within the FORM. Set it's value to 1 in your function. When the form is submitted you can check the form collection to see what the value is. Be sure to set the value to 0 initially, then change it to 1.

3. No problem.