Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set cursor focus at Login page
#1
Sets the cursor focus to the username field in the login form.
Paste the following code on your text editor and save as setfocus-login.php (or whatever) in your plugins folder:
Code:
<?php

/* setfocus-login.php */
/* for GetSimple 2.00+ */

$thisfile = basename(__FILE__, ".php");
register_plugin(
    $thisfile,
    'Set focus (login)',
    '0.1 beta',
    'Carlos Navarro',
    '#',
    'Set cursor focus to username field when login into GS'
);

add_action('login-reqs','setfocus_login');

function setfocus_login() {
    echo "<script type=\"text/javascript\">try{document.getElementById('userid').focus();}catch(e){}</script>";
}

?>
Reply
#2
It does not work for me. I get just a white screen.
I have not tried so hard.
Reply
#3
Please check if you have the last line in the saved file:
Code:
?>
Reply




Users browsing this thread: 1 Guest(s)