CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 ListBox and Label dependant question

Print topic Send  topic

Author Message
Arthur Dent
Posted: 02/15/2006, 7:00 AM

Hi!

Could someone help with with my problem.
I newbie and have spend 2 days trying to solve this maybe simple question.

I have table which I have 4 columns
(Id,ItemNum, ItemText,CodeNum).

I have add Record on my page and 2 controls (ListBox and Label) on it.

ListBox will get the use the ItemNum and return the ItemText.

Question is, how I can get the label show the CodeNum from table which ListBox is showing.
So When I use the ListBox then I'll get the name to ListBox and CodeNum to Label.

Please, need help on this!!

;-) AD
Arthur Dent
Posted: 02/15/2006, 12:31 PM

Hi!
If there is someone to help me cause, I started to be little lost the hope.

I have tryed the DependentListBox Examples and I cannot understand how it should work.

Even I tryed to modify the example code and I stooped to work.

All help is welcome.

AD
matheus

Posts: 386
Posted: 02/16/2006, 3:21 AM

Listbox need pass the selected by parameter.

On change listbox, need refresh page (by javascript), passing the parameter.

The label need retrieve value from url and show.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
Arthur Dent
Posted: 02/16/2006, 5:37 AM

Thanks Matheus to reply.

Could you or some one just give me step by step uinstructions for this.
I have use this software just 5 days and I have deadline at next week.
My pages are Ok when this is done.

Please, help needed.

AD
matheus

Posts: 386
Posted: 02/17/2006, 8:31 AM

You use Javascript?

I only know a solution in javascript...
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
Arthur Dent
Posted: 02/17/2006, 2:32 PM

Now I have find solution how to get the value to Label, but still got one problem. How to update this value.

When you choose from listbox value, nothing happens. If I push add or submit, then I can see that Label have value.

If I use event submit, then the ListBox doesn't have value any more.
Is there any change that this label value will update right after the ListBox have value??

AD
peterr


Posts: 5971
Posted: 02/17/2006, 2:41 PM

Arthur,
I didn't understand your last message. Does everything work correctly when you manually press the Submit button?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Arthur Dent
Posted: 02/17/2006, 3:15 PM

Yes! It goes like this.

I choose from listbox (dropdown) any value. After that the TextBox is showing nothing, but if I hit the Add or Submit, then I can see correct text in TextBox, but the ListBox has no value. I haven't use Java on this.

I just add custom code to ListBox which get correct value from SQL database to TextBox.
Is there any change to get this TextBox update it's value ListBox onChange event or something?

AD
Arthur Dent
Posted: 02/18/2006, 6:13 AM

I forgot to tell that the ListBox custom code is in ListBox event BeforeShow and onChange there is Submit form.

These settings have to been wrong, but help is needed.

AD
peterr


Posts: 5971
Posted: 02/21/2006, 2:50 AM

Arthur,
If form submission works OK then you can use JavaScript OnChange event to submit the form automatically when a new value was selected in the listbox. I think that this example is similar enough to what you need that you may be able to use it: http://support.yessoftware.com/kb_article.asp?article_id=61
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Arthur Dent
Posted: 02/21/2006, 10:52 PM

Peter,

I tryed to use OnChange but it didn't work. This option was first in my mind.

I made my own solution so that I used example RetrievingFieldsValues.
From ListBox I get value to TextBox.
And Then made new command which get value to Label. I added to TextBo that OnChange do the command. If I added value to TextBox all works well, but if the first code brings the value to TextBox then the second will not wok.

AD

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.