to this: to this:
 
Previous Thread
Next Thread
Print Thread
Rate Thread
#224373 09/10/2002 11:50 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
In your config.inc.php file add this variable:

$config['onload'] = "";



In your ubbt_header.tmpl file change this:

<body>

to this:

<body {$config['onload']}>



LOGIN
======================================================================
Now to place the cursor in the Username box during login you will need to edit your login.tmpl and change this:

<form method="post" action="{$config['phpurl']}/start_page.php">

to this:

<form name="userLogin" method="post" action="{$config['phpurl']}/start_page.php">


Now in your login.php script, just above this:

$html -> send_header($ubbt_lang['LOGIN_PROMPT'],$Cat,0,0,0,0);

add this:

$config['onload'] = "onload="document.userLogin.Loginname.focus()"";
======================================================================





NEW POST
======================================================================
In your newpost.php script just before this:

$html -> send_header("{$ubbt_lang['MAKENEW_HEAD']} ($Title)",$Cat,0,$user,$Board);

add this:

$config['onload'] = "onload="document.replier.Subject.focus()"";
======================================================================





NEW REPLY
======================================================================
In your newreply.php script just before this:

$html -> send_header("{$ubbt_lang['REPLY_HEAD']} ($Title)",$Cat,0,$user,$Extra,$ReadPerm);

add this:

$config['onload'] = "onload="document.replier.Subject.focus()"";
======================================================================





There's more scripts that you can use this with. Just make sure the form has a name and follow the same steps above but adjusted for what ever form/page your changing.



Edit Note: I had an error in the LOGIN code. The form's name should have been "userLogin"

Last edited by JustDave; 09/10/2002 12:25 PM.
Sponsored Links
Entire Thread
Subject Posted By Posted
[UBBT 6.1] onload focus JustDave 09/10/2002 6:50 PM
Re: [UBBT 6.1] onload focus AllenAyres 09/10/2002 7:22 PM
Re: [UBBT 6.1] onload focus JustDave 09/10/2002 7:27 PM
Re: [UBBT 6.1] onload focus JoshPet 09/10/2002 7:29 PM
Re: [UBBT 6.1] onload focus JustDave 09/10/2002 7:33 PM
Re: [UBBT 6.1] onload focus JoshPet 09/10/2002 7:39 PM
Re: [UBBT 6.1] onload focus Zackary 03/13/2003 5:11 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2112
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 1
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)