Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/05/2003, 14:20
Avatar de Sperrit
Sperrit
 
Fecha de Ingreso: marzo-2003
Ubicación: Valenciennes, Francia
Mensajes: 117
Antigüedad: 21 años, 1 mes
Puntos: 0
Cambiar Foco a boton submit al pulsar TAB

Saludos a todos...

Vereis, tengo que aniadir una liger modificacion a mi foro phpBB, pero no se como hacerlo

Necesito que, cuando el usuario esta escribiendo un mensaje, al pulsar el tab, el focus pase del textarea al boton submit en lugar de al siguiente enlace (como en esta pagina ;)).

El problema es que no se como hacerlo , porque nunca he tocado los onFocus...

ALguien puede ayudarme con las lineas generales??

Gracias de antemano

Este es el formulario al que hay que aniadirle la funcion:


Código PHP:
<form action='{quick_reply.POST_ACTION}' method='post' name='post' onsubmit='return checkForm(this)'>
        <
input type="hidden" name="sid" value="{quick_reply.SID}">
        <
table border='0' cellpadding='10' cellspacing='1' width='70%' class='forumline'>
                <
tr>
                        <
th class='thHead' colspan='2' height='25'><b>{L_QUICK_REPLY}</b></th>
                </
tr>
                <!-- 
BEGIN user_logged_out -->
                <
tr>
                        <
td class='row2' align='left'><span class='gen'><b>{L_USERNAME}:</b></span></td>
                        <
td class='row2' width='100%'><span class='genmed'><input type='text' class='post' tabindex='1' name='username' size='25' maxlength='25' value='' /></span></td>
                </
tr>
                <!-- 
END user_logged_out -->
                <
tr>
                        <
td class='row1'>
                        </
td>
                        <
td class='row1' align='center' valign='top'>
                                <
textarea name='message' rows='10' cols='80'  wrap='virtual' tabindex='3' class='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>
                                
                                </
textarea><br>
                                <!-- 
BEGIN smilies -->
                                <
img src="{quick_reply.smilies.URL}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon(' {quick_reply.smilies.CODE} ');" alt="{quick_reply.smilies.DESC}" title="{quick_reply.smilies.DESC}" />
                                <!-- 
END smilies -->
                                <
INPUT TYPE=button CLASS=BUTTON NAME="SmilesButt" VALUE="{L_ALL_SMILIES}" ONCLICK="openAllSmiles();">
                                <
br /></td>
                </
tr>
                <
tr>
                        <
td class='row2'>
                        </
td>
                        <
td class='row2' valign='top'><span class='gen'>
                                <
b>{L_OPTIONS}</b><br />
                                <
input type='checkbox' name='quick_quote'>{L_QUOTE_LAST_MESSAGE}<br>
                                <!-- 
BEGIN user_logged_in -->
                                <
input type='checkbox' name='attach_sig' {quick_reply.user_logged_in.ATTACH_SIGNATURE}>{L_ATTACH_SIGNATURE}<br>
                                <
input type='checkbox' name='notify' {quick_reply.user_logged_in.NOTIFY_ON_REPLY}>{L_NOTIFY_ON_REPLY}</span></td>
                                <!-- 
END user_logged_in -->
                </
tr>
                <
tr>
                        <
td class='catBottom' align='center' height='28' colspan='2'>
                                <
input type='hidden' name='mode' value='reply'>
                                <
input type='hidden' name='t' value='{quick_reply.TOPIC_ID}'>
                                <
input type='hidden' name='last_msg' value='{quick_reply.LAST_MESSAGE}'>
                                <!--
input type='hidden' name='message' value=''-->
                                <
input type='submit' name='preview' class='liteoption' value='{L_PREVIEW}'
                                <
input type='submit' name='post' class='mainoption' tabindex="1" value='{L_SUBMIT}'>
                        </
td>
                </
tr>
        </
table>
</
form