CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Dependent Listboxes

Print topic Send  topic

Author Message
RG
Posted: 04/27/2003, 5:56 PM

I have a listbox for Countries and one for States in a form. Each row in the database table States contains the id of it's country.
I have the javascript: onchange="javascript:document.myform.submit()" When the Country is changed and fill the States according to the preserved GET: content of the Country_Id Listbox that comes with the submitted form.
It works when the form is in the Add (Insert) Mode but it wouldn't when it is in the Edit (Update) mode. It just reloads the form with the original data for updating.
Any suggestions what I do wrong?

Thanks,
RG
heel
Posted: 04/27/2003, 10:28 PM

You are right this is a known issue. Many people ask the same question but never got any answer. I think u should use other solution. I already give up hope on this
Headhunter
Posted: 04/28/2003, 1:05 AM

I have the same problem,

I have to clear the latest listbox and then select a new value for the previous listbox.

Look at the following demo site and play with it, I think it's the same problem u have:
login: admin
password: admin

http://www.dbweaver.com/trackitstudio/pc/hwr_pc_list.ph...ity=1&p_id=7060

Then it works. It's not a good way to do this for a public website.
Just use the following example for such a simple setup:

http://support.codecharge.com/kb_article.asp?s_keyword=...=&article_id=61

www.dbweaver.com
RG
Posted: 04/28/2003, 1:27 PM

I don't understand the difference between what I do and the example in the CCS Knowledge Base. What I see is that the trigger javascript: onchange = "javascript:document.myform.submit()" is moved from the Listbox to the top of the HTML and is a link instead of the submit form: window.location.href = "myform.jsp?Country_Id=" + this.value;
The result seems still to be the same. What is that I can't see?

By the way, I debugged the CCS code. For the Add mode CCS passes the parameter: "ccsForm=Myform" but "ccsForm=Myform:Edit" for the Update mode. With the function "isEditMode" you can find out if the form is in edit mode. There should be also a way to change the mode manually and put it back right after the process is done. Am I going to far?

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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