john.brown Posted May 5, 2006 Report Posted May 5, 2006 (edited) šitāds primitīvs kodiņš: <form action="index.php" id="imgform" name="imgform" method="post"> <script type="text/javascript"> function submitForm(view) { input = document.getElementById('view'); form = document.getElementById('imgform'); input.value = view; form.submit(); } </script> <input type="button" name="del" value="Delete selected" onClick="submitForm('del');"> <input type="button" name="edit" value="Edit selected" onClick="submitForm('edit');"> <input type="hidden" id="view" name="view" value=""> </form> Iekš ff viss notiek. Iekš IE 'view' paliek tukš :( upd: Izrādās, uzseto. Vismaz ieliekot funkcijā šitādu: alert('view:'+input.value); parāda, ka value ir pareiza. Tak pie submits līdz php skriptam nenonāk >8( upd: Ha! Atrisināju! document.imgform.view.value = view; Tak tomēr interesanti, kāp. pirmais variants negāja? It kā tak korektāk ir caur getElementById griezties... Edited May 5, 2006 by john.brown
Grey_Wolf Posted May 5, 2006 Report Posted May 5, 2006 (edited) john.brown --> IE versija ? input.value = view; kur tu redzi nodeklereetu mainiigo view? Edited May 5, 2006 by Grey_Wolf
john.brown Posted May 5, 2006 Author Report Posted May 5, 2006 (edited) IE 6 tak funkcijai padodas: function submitForm(view) {...} Edited May 5, 2006 by john.brown
Recommended Posts