HZGN.COM
welcome to my space
X
Welcome to:hzgn.com
Search:  
Feng Shui | Graphic Design | Cosmetics | Causes and Organizations | Regulatory Compliance | Gadgets and Gizmos | Computer Forensics | Tools and Equipment | Related articles
NAVIGATION: Home >>
textInput area text
Published by: rose 2009-01-07

  • In the parameters of the textInput field you can have words show up in them by default (like name, email, etc.)
    Javascript function call::
    One of my form in pure HTML has 1 text input field and 2 buttons. Pressing one of the buttons triggers a search-me() function. I'm also using the following
    http://answers.google.com/answers/threadview?id=743341
    HOME
    What I'm trying to do is have it so when you click on the field these words disappear. As it stands now, when I put a word in the parameter the user would have to erase it and enter in their own.
    Mobile Online-Community::
    According to a proprietary survey of cell phone users by the high tech research firm, Wi-Fi- and Skype-enabled handsets, voice activation for text input,
    http://answers.google.com/answers/threadview/id/725444.html
    HOME
    I'd also like to have it greyed out a bit to, if that's possible.
    Is this an actionscript issue or am I not entering it correctly in the parameters?


  • What the onkillfocus is doing is setting the textfields text to the value of the defaul variable, this way if the user just clicks on it and doesn't type anything in the text will reset back to enter some text if I'm not mistaken.

    But if the user has entered text it will set the textfield to the text the user has entered , dont know if I made mysyelf clear there.


  • i think youd use the onSetFocus and onKillFocus for the text erase part of your question
  • My website crashes IE::
    So, if we use an "onChange" event handler in a text input box, and the user enters data and TABS out of the box, the onChange event handler is invoked.
    http://answers.google.com/answers/threadview/id/16063.html
    HOME
    Mac OS X Programming: Dialogs, Controls and Events::
    I understand you can process text input using Apple events, but that's not what I want to do here if I can avoid it. How do I do this?
    http://answers.google.com/answers/threadview?id=59561
    HOME


  • ahh..I got it.

    But in this code:

    var _default:String = "enter some text";
    inp_txt.text = _default;

    inp_txt.onSetFocus = function():Void {
    this.text = "";
    }

    inp_txt.onKillFocus = function():Void {
    this.text = _default;
    }


    the onKillFocus will erase anything that the user puts in that area and replace it with, in this case, whatever is in the _default section defined at the beginning.
    Is the best way to keep the user info to just get rid of the onKillFocus code?


  • In the parameters of the textInput field you can have words show up in them by default (like name, email, etc.)
    What I'm trying to do is have it so when you click on the field these words disappear. As it stands now, when I put a word in the parameter the user would have to erase it and enter in their own.
    I'd also like to have it greyed out a bit to, if that's possible.
    Is this an actionscript issue or am I not entering it correctly in the parameters?

    Use this code

    instanceName.onSetFocus = function() {
    this.text = "";
    };


    **edit a little late huh :lol:


  • Yup - you could do something like this:

    var _default:String = "enter some text";
    inp_txt.text = _default;

    inp_txt.onSetFocus = function():Void {
    this.text = "";
    }

    inp_txt.onKillFocus = function():Void {
    this.text = _default;
    }

    :mountie:


  • aces...works sweet.

    Thanks for your help!


  • Just an example :)

    If you wish to use onKillFocus - you could do something like this:
    inp_txt.onKillFocus = function():Void {
    if(!this.text.length) {
    this.text = _default;
    }
    }

    :glasses:





  • Red Hat's Rough Recovery From CFO Exit
    Windows Live Finds a New, Pre-installed Home

    You are looking at:hzgn.com's textInput area text, click hzgn.com to home
    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about textInput area text , Please add it free.
  • java serversocket flash
  • shortcuts and extensions on windows vista 64
  • flash cs4 flex 3 sdk embed data tag
  • flash cs4 flex 3 sdk embed data tag
  • 3d objects projection
  • does cs4 have native motion blur
  • cs4 actionscript problem
  • animating in cs4 running very slow compared to cs3
  • post your new stuff
  • quick animator example
  • quick animator example
  • error 5005 unknown error optimizing byte code
  • error 5005 unknown error optimizing byte code
  • post your new stuff
  •  
  • hardware acceleration in flash games become bigger and faster
  • 3d objects projection
  • mac os x bug
  • shortcuts and extensions on windows vista 64
  • goodbye remotingclass component hello netconnection
  • mac os x bug
  • java serversocket flash
  • buttons not working
  • cs4 actionscript problem
  • hardware acceleration in flash games become bigger and faster
  • upgrading flash8 as2 to cs3 as3
  • animating in cs4 running very slow compared to cs3
  • upgrading flash8 as2 to cs3 as3

  • About us -Site map -Advertisement -Jion us -Contact usExchange linksSponsor us
    Copyright© 2008 hzgn.com All Rights Reserved
    Site made&Support support@hzgn.com    E-mail: web@hzgn.com