Maksudnya bukan kalau pertama kali di-load, lalu mem-fokus pada tombol itu, tapi kalau tekan ENTER, yang diakses secara default adalah tombol itu. Jika seperti yang MAs contohkan itu (pakai index atau fokus), jika form seperti ini:
<form> <input name="bla" type="text"> <input type="submit" name="Kirim1" value="Kirim1"> <input type="submit" onload="this.focus()" name="Kirim2" value="Kirim2"> </form> Maka jika user memasukkan data di type text, maka secara otomatis jika ditekan ENTER, yang dieksekusi adalah Kirim1, dan bukan kirim2. Maunya, saat user mengisikan data dan menekan ENTER, yang diakses adalah Kirim2. LuckyGuy354 IT Beginner ----- Original Message ----- From: "Natali Ardianto" <[EMAIL PROTECTED]> > The simplest way, pindahin tombol submit yg kirim keatasnya submit yg edit :) > > Actually, bisa saja. Here's w3c.org definition of submit button: > > buttons > Authors may create three types of buttons: > * submit buttons: When activated, a submit button submits a form. A > form may contain more than one submit button. > > Dan yg dianggap successful control adalah: > 17.13.2 Successful controls > > A successful control is "valid" for submission. Every successful > control has its control name paired with its current value as part of > the submitted form data set. A successful control must be defined > within a FORM element and must have a control name. > However: > * If a form contains more than one submit button, only the > activated submit button is successful. > > > Jadi, coba teknik ini: > > <input type="submit" tabindex="3" name="Edit" value="Edit"> > > <input type="submit" tabindex="2" name="Hapus" value="Hapus"> > > <input type="submit" tabindex="1" name="Kirim" value="Kirim"> > > Kalau engga, di tombol input, dipasang javascript: > > <input type="submit" onload="this.focus()" name="Kirim" value="Kirim"> > > Kali bisa :) --- Website: http://toekangweb.or.id/ Arsip milis : http://groups.yahoo.com/group/toekangweb/messages Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/toekangweb/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
