vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Getting the cursor to automatically be in the subject field (https://vborg.vbsupport.ru/showthread.php?t=40991)

Gutspiller 07-12-2002 07:36 PM

Getting the cursor to automatically be in the subject field
 
So that everytime my users click on reply or post a thread the cursor is already in the subject field, that way all they have to do is type the subject and/or hit tab to post a thread/reply.

I know this is possible and it should be fairly easy. Just something simple that I thought would help a lot of users.

Any help you can give would be appreciated.

Thanks!

Smoothie 07-12-2002 08:15 PM

I would like to see in the text box for new replies, in the subject box for new threads.

Gutspiller 07-12-2002 10:25 PM

even better. :)

Birdie501 07-13-2002 03:26 PM

Hi,

just add this to your template:

PHP Code:

function focus(theform) {
document.vbform.XXX.focus();


before

PHP Code:

</script>
</
head

and replace XXX with the name of the field!

Then
replace
PHP Code:

<body

with:
PHP Code:

<body onload="focus()"

:cool:

Smoothie 07-13-2002 04:47 PM

Compatable with all browsers?

Birdie501 07-13-2002 04:52 PM

It is javascript, so it should work with all browsers but i can not confirm! Please test it :)

Smoothie 07-13-2002 04:53 PM

How would you get the number of the subject and text box field?

Logician 07-13-2002 05:24 PM

it's not number, it's the form field name.. you can find it by checking the source code or relevant template. Eg:

<input type="text" class="bginput" name="title" value="" size="40" maxlength="85" tabindex="1">

name in this field is "title"...(That is subject field of Newreply form)

Smoothie 07-13-2002 06:10 PM

can't get it to work...:(

Birdie501 07-13-2002 07:04 PM

well it works for me but the background color of the page is missing?
Does somebody know why?


All times are GMT. The time now is 04:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01725 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete