Animetal
Posts: 27
|
| Posted: 05/07/2008, 2:21 PM |
|
Hi,
Im trying to follow the example (http://examples.codecharge.com/ExamplePack/ManyToManyListboxes/ManyToManyListboxes.php)
But now I cant find the reason why I cant get back the items from the linked listbox to the available one, and if I leave an item in the linked listbox and clic on submit it add the same item again, leaving the list with two identical items. Right now I dont know how CCS do to remove the linked item from the listbox, another point is this example wont run in FireFox, the javascript is not working properly in this browser.
Thanks in advance
|
 |
 |
Animetal
Posts: 27
|
| Posted: 05/07/2008, 2:39 PM |
|
Just to be a little more specific....
In this code
if($EmpID >0){
if( ($Actions == "Delete") || ($Actions == "Update")) {
//Delete project employees links
$EmpProjectConn->query("DELETE FROM projects_employees WHERE emp_id=".$EmpProjectConn->ToSQL($EmpID,ccsInteger));
}
if($Actions == "Update"){
//Insert assigned employees
reset($ProjectList);
while(list($key,$ProjectID) = each($ProjectList)){
if(intval($ProjectID)>0){
$EmpProjectConn->query("INSERT INTO projects_employees (project_id, emp_id) VALUES (".$EmpProjectConn->ToSQL($ProjectID,ccsInteger).",".$EmpProjectConn->ToSQL($EmpID,ccsInteger).")");
}
}
}
}
Everything as I can see is working properly but how CCS remove the linked items using this code?
if Im updating the field.
|
 |
 |
Animetal
Posts: 27
|
| Posted: 05/08/2008, 6:48 AM |
|
I found my mistake, and it was something basic grrr....
in this line:
( ($Actions == "Delete") || ($Actions == "Update"))
I was thinking the || was like AND and not OR so I was skipping that SQL code, after checking it I found my variable wasnt typed correctly so after changing it everything is working fine in IE 7.
Now If somebody knows how to make this work on FireFox (I think this is not working because of something in the javascript code) it would be appreciated
Thanks
|
 |
 |
|