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?
|
|
|
 |