X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=philter%2Fphilter%2Fphilter.js;h=f8fda11f8839f215ef20540ed6efb16176035bda;hb=0eb037c8932a93863e1c59de1062c73a2fcbae21;hp=806062dd6b1bc24b190507601b04dcb2416e0891;hpb=fccf8ac83b416f8c4081cdfc5b87e504b3e7fe3f;p=old-projects.git diff --git a/philter/philter/philter.js b/philter/philter/philter.js index 806062d..f8fda11 100644 --- a/philter/philter/philter.js +++ b/philter/philter/philter.js @@ -29,10 +29,10 @@ function getElement(obj) { return false; } -function del_onclick(button) { - if(window.confirm("Voulez vous réellement supprimer cette adresse mail ?")) { - getElement('emailsDel').value = button.name.slice(1); - button.form.submit(); +function del_onclick(val) { + if(window.confirm("Do you really want to delete this email address ?")) { + getElement('emailsDel').value = val; + document.forms['emails'].submit(); } } @@ -104,12 +104,14 @@ var matches_i = 0; /********** RULE.ACTION FORM FUNCTIONS **********/ -function createActionSelect(data,base) { +function createActionSelect(div,data) { var i,j; var select = document.createElement("select"); var sel = 0; - select.name = base+'[0]'; + select.name = div.name+'[0]'; + // OG: must insert select node before creating options because of IE5 bug + div.appendChild(select); for(i=0, j=0; i