vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Disapearing login text (https://vborg.vbsupport.ru/showthread.php?t=85561)

imported_JakeC 12-06-2002 12:56 AM

Disapearing login text
 
Another login text question. here is my login prompt code:

Quote:

<table width="227" background="images/login.jpg" border="0" cellpadding="2" cellspacing="0" height="33">

<td valign="top" align="right">
<form action="http://www.homebuiltairplanes.com/forums/member.php" method="post"><input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="login" readonly="readonly">
<input type="text" class="bginput" name="username" size="8" value="username">
<input type="password" class="bginput" name="password" size="7" value="passwor">
<input type="submit" class="bginput" value="Login!"></td></form>

</table>
What code do I add to make it so that when the user clicks once in the text input field the text disappears? As it stands right now when the user clicks in the field they have to delete the text before they can input their information. Thanks in advance.

JakeC

Example:

now you see it
https://vborg.vbsupport.ru/external/2002/12/1.gif

now you don't
https://vborg.vbsupport.ru/external/2002/12/2.gif

filburt1 12-06-2002 01:08 AM

In the input tags, onClick="if (this.value='username') this.value='')". Untested but I think that works.

imported_JakeC 12-06-2002 05:27 PM

Well, I gave it a try and that wasn't it. I tried inserting the code that the above pictured site uses to make it work on their site but it doesn't work for me either. Does this involve java script?

JakeC

filburt1 12-06-2002 05:49 PM

Make sure you're copying and pasting, the '' at the end is not a "

Or try this:
Code:

<input type="text" class="bginput" name="username" size="8"
    value="username" onClick="if (this.value='username') this.value=''">

This is Javascript...and BTW I just noticed a bug in my previous post so try this one.

Nairb 12-06-2002 05:58 PM

yup
that works
gj filburt

imported_JakeC 12-06-2002 11:30 PM

filburt1,

You rock! Thanks a bunch. This was my last obstacle before launching my site so within a day or two I should be going live. Thanks.

JakeC



www.homebuiltairplanes.com

filburt1 12-06-2002 11:45 PM

Glad to be of service :)

Nairb 12-07-2002 12:05 AM

someone should release that in a mod?


All times are GMT. The time now is 10:53 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.01073 seconds
  • Memory Usage 1,726KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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