}
}
+function emptyJobSubSector(id)
+{
+ Ajax.update_html('job_' + id + '_subSubSector', 'profile/ajax/sub_sector/' + id + '/-1/-1');
+}
+
+function emptyJobAlternates(id)
+{
+ Ajax.update_html('job_' + id + '_alternates', 'profile/ajax/alternates/' + id + '/-1');
+}
+
function displayAllSector(id)
{
$('.sector_text_' + id).remove();
<tr class="pair {$sector}" style="display: none">
<td class="titre" rowspan="4">Secteur d'activité</td>
<td>
- <select name="{$jobpref}[sector]" onchange="updateJobSector({$i}, '')">
+ <select name="{$jobpref}[sector]" onchange="updateJobSector({$i}, ''); emptyJobSubSector({$i}); emptyJobAlternates({$i});">
<option value="0"> </option>
{foreach from=$sectors item=item}
<option value="{$item.id}" {if $item.id eq $job.sector}selected="selected"{/if}>
{**************************************************************************}
<?xml version="1.0" encoding="utf-8"?>
-<select name="jobs[{$id}][subSector]" {if ($change)}onchange="updateJobSubSector({$id}, '')"{/if}>
+<select name="jobs[{$id}][subSector]" {if ($change)}onchange="updateJobSubSector({$id}, ''); emptyJobAlternates({$id});"{/if}>
<option value="0"> </option>
{iterate from=$subSectors item=subSector}
{if $subSector.optgroup}