Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-06-2002, 12:56 AM
imported_JakeC imported_JakeC is offline
 
Join Date: Jul 2002
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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


now you don't
Reply With Quote
  #2  
Old 12-06-2002, 01:08 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the input tags, onClick="if (this.value='username') this.value='')". Untested but I think that works.
Reply With Quote
  #3  
Old 12-06-2002, 05:27 PM
imported_JakeC imported_JakeC is offline
 
Join Date: Jul 2002
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 12-06-2002, 05:49 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 12-06-2002, 05:58 PM
Nairb
Guest
 
Posts: n/a
Default

yup
that works
gj filburt
Reply With Quote
  #6  
Old 12-06-2002, 11:30 PM
imported_JakeC imported_JakeC is offline
 
Join Date: Jul 2002
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 12-06-2002, 11:45 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to be of service
Reply With Quote
  #8  
Old 12-07-2002, 12:05 AM
Nairb
Guest
 
Posts: n/a
Default

someone should release that in a mod?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:39 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.03996 seconds
  • Memory Usage 2,225KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (6)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete