vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   OnFocus Clears Current Value in Input Box (https://vborg.vbsupport.ru/showthread.php?t=225073)

markk 10-12-2009 06:50 AM

OnFocus Clears Current Value in Input Box
 
Recently, we upgrade to 3.8.4PL1 and did some major restyling of the mesage board. One of the behavior that our users noted was that <input> fields on forms such as "edit thread" have the behavior where the current (default) value disappears when the cursor is focused on the field. This is problematic for users editing fields like title where the want to modify the title based on the previous title.

The question is how is retain the behavior such then when the cursor is focused on an <input> field that to starts the field for editing with the current "value=" attribute rather than blank.

Thanks,
Mark K.

Lynne 10-12-2009 03:17 PM

Try this -
Create a new style with no parent:
  • Styles & Templates > Style Manager > Add New Style
  • Parent Style: No Parent Style
  • Title: Default vBulletin
  • Allow User Selection: Yes
  • Save
Then browse the site using that totally default vbulletin style - do you still have the same problem?

markk 10-12-2009 03:46 PM

The default style does not exhibit this issue-- in other words, the default style has the input field with default value available for editing.

I have looked at the HTML generated for the problem styling, and I don't see any javascript for onfocus or the like. I would appreciate any suggestions on debugging the issue.

Thanks, Mark K.

Lynne 10-12-2009 03:55 PM

I would take a look at the page, find the templates on the page, then edit that template and select View History > Compare and see what the differences are between your style and the default Jelsoft style and then modify your style accordingly.

pein87 10-19-2009 08:52 PM

add this to your input box

HTML Code:

value="username" onfocus="if(this.value=='username')this.value=' ';" onblur="if(this.value==' ')this.value='username';"
it changes the input text dynamicly if you click inside it the value is blank if you click away and the input is blank it goes back to username. also in your css add the :focus psuedo-class so it works in all IE versions.


All times are GMT. The time now is 01:18 AM.

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.01568 seconds
  • Memory Usage 1,716KB
  • 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
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete