How to read ComboBox (Infragistics) DisplayValue

M

modulo

Hi!

I have a Problem with reading a value from an Infragistics WebCombo.
Actually this is a Javascript problem but i hope posting in this NG is
more promising.

I try to ready a value from an ComboBox with one of these Functions:

igcmbo_getElementById("WebCombo2").value;
or
document.getElementById("WebCombo2").value; (both have the same
effect)

As result i got: Select-1Valuetest
(test is what i wrote in the ComboBox)
How can i read the display value from the ComboBow without the
DropDownList information (Select-1Value)?

Gruß
Oliver
 
S

S. Justin Gengo

document.WebCombo2.options[WebCombo2.selectedIndex].value;

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Hi!

I have a Problem with reading a value from an Infragistics WebCombo.
Actually this is a Javascript problem but i hope posting in this NG is
more promising.

I try to ready a value from an ComboBox with one of these Functions:

igcmbo_getElementById("WebCombo2").value;
or
document.getElementById("WebCombo2").value; (both have the same
effect)

As result i got: Select-1Valuetest
(test is what i wrote in the ComboBox)
How can i read the display value from the ComboBow without the
DropDownList information (Select-1Value)?

Gruß
Oliver
 
O

Oliver Orsteck

Hi!
Thank you for the answer but it doesnt seem to work.

document.WebCombo2.options[WebCombo2.selectedIndex].value;
It looks like the WebCombo2 Control cant be found. Do you have another
idea?

Gruß
Oliver
 
S

S. Justin Gengo

Oliver,

Depending on how your combobox id is assigned you may need to put its name
in single quotes.

document.'WebCombo2'.options['WebCombo2'.selectedIndex].value;

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
O

Oliver Orsteck

Hi Justin!

Thanks for your patience. I got the answer myself. I told you I only
need the WebCombo value wihtout the DowpDownList information. My falut
was I thought getElementById("WebCombo2").value; would give me value
of the textfield of the WebCombo but it returns the entire WebCombo2
data (including DropDownList infos).

The Infragistics WebCombo generates while compiling an WebCombo2_input
control where i found what i was searching for.
-> getElementById("WebCombo2_input").value;
Bathetic but i overlooked that fault.

Gruß
Oliver
 
S

S. Justin Gengo

Oliver,

I'm glad you found it!

:)

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Hi Justin!

Thanks for your patience. I got the answer myself. I told you I only
need the WebCombo value wihtout the DowpDownList information. My falut
was I thought getElementById("WebCombo2").value; would give me value
of the textfield of the WebCombo but it returns the entire WebCombo2
data (including DropDownList infos).

The Infragistics WebCombo generates while compiling an WebCombo2_input
control where i found what i was searching for.
-> getElementById("WebCombo2_input").value;
Bathetic but i overlooked that fault.

Gruß
Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top