Jump to content

Automatic focus on report field needed


wheeler
 Share

Recommended Posts

It would be a real help if the textarea where to paste the spam would already have the focus when the page opens.

This can easily be achieved by changing the <body>-tag of the submit page to

<body onload="document.forms[1].elements['spam'].focus();">

And I would like to have a submit on Enter-key for the "Report spam Page".

Put this java scri_pt in the HTML Header:

<scri_pt type="text/java scri_pt">

<!--

document.onkeypress=function k(evt){

var k=document.all?window.event.keyCode:evt.which;

if(k==3){

document.forms[1].submit();

return false;

}

}

//-->

</scri_pt>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...