Hello,
I have a two listboxes that I use to transfer items from one to another. On my destination listbox I want to set one item as a default item.
I have decided to add a button that will take the selected item and set an image to it to indicate that this item is the default one.
I have done so using javascript:
When I push the button to run this function I get an invalid argument error during runtime of the script. It happens in the insertBefore function of the current list item.
Any ideas?
Thanks,
Oded
I have a two listboxes that I use to transfer items from one to another. On my destination listbox I want to set one item as a default item.
I have decided to add a button that will take the selected item and set an image to it to indicate that this item is the default one.
I have done so using javascript:
| function setDefaultReport() { |
| selectedReportsList.trackChanges(); |
| var selectedItem = selectedReportsList.get_selectedItem(); |
| if (selectedItem) { |
| if (defaultReport) { |
| defaultReport.set_imageUrl(""); |
| } |
| } |
| selectedItem.set_imageUrl("/images/icon.gif"); |
| defaultReport = selectedItem; |
| } |
| selectedReportsList.commitChanges(); |
| } |
When I push the button to run this function I get an invalid argument error during runtime of the script. It happens in the insertBefore function of the current list item.
Any ideas?
Thanks,
Oded