TextInput change text on click

Hello all.
I have a text input that has the text "Name".  What i want to do, is when this is clicked it gets rid of this text.  I can do it this way
<s:TextInput x="10" y="291" width="265" textDecoration="none" text="Name" id="txt_name" click="txt_name.text=''" fontStyle="italic"/>
Simply changing the value of text to "" on the click attribute.
However this causes problems because if you click it once it gets rid of "Name" and then you type in something, if you clicked it again it would get rid of what you typed in.
So i though about this simple function
            protected function commentnametext():void
                if (txt_name2.text == 'Name')
                    txt_name2.text == '';
                else
<s:TextInput x="10" y="321" width="265" textDecoration="none" text="Name" id="txt_name2" click="commentnametext()" fontStyle="italic"/>
However when i click the textarea it dosent seem to run the function, the text dosent change.  Any ideas why its not working?

Your function is wrong
protected function commentnametext():void
                if (txt_name2.text == 'Name')
                  txt_name2.text == '';  --- you have to write here txt_name2.text=''; instead of 2 == write only 1 =
                else
If this post answers your question or helps, please kindly mark it as such.

Similar Messages

  • Corrupt Photoshop file changes text when clicking in text layer

    I have a really weird problem with one of my files. When I click on the text, it changes the text to completely different words. Seems like it is corrupt somehow... please see below images to see what I mean. Has anyone else experienced this? Is there a fix? I'm on CS6 mac OS 10.8.4.
    Before:
    After:
    Out of curiosity I also opened up the file in text edit to see if there was anything obvious, and here's some of the code. I'm assuming this is preview text for search, but either way seems a bit fishy.
    <rdf:li rdf:parseType="Resource">
                      <photoshop:LayerName>Partners</photoshop:LayerName>
                      <photoshop:LayerText>WE WILL BE...</photoshop:LayerText>
    </rdf:li>
    Trying to edit the text and saving it out corrups the file.

    That was a problem in Photoshop 13.0 that was fixed in later dot releases.  Please make sure you have the latest updates installed.
    But the file itself was corrupted and cannot be completely repaired.  The good news is that the bug just scrambled the text - it's all there, just moved around.

  • I used to have a +.- displayed in upper left corner to click and change text size. My sister used my computer and now I can no longer find this feature.

    I used to have a +.- displayed in upper left corner to click and change text size. My sister used my computer and now I can no longer find this feature

    Do you still have all toolbars visible (View > Toolbars)?
    Did you use an extension or the standard zoom buttons that you can find in the toolbar palette in the View > Toolbars > Customize window ?
    Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily.

  • Can't change text once I've finalized it!

    I've been using Photoshop for years, so I know all the basics.  And I've never run into this before.  I created a document with text boxes and images.  Everything was fine to that point.  But when I went back to re-word the text boxes and change text color, I could not do it.  I tried everything:  be sure that layer is selected, be sure I have the type tool enabled, and click somewhere in the existing text.
    Nothing doing.  No matter what I did, it insisted on starting a new text layer.  I could not access the text itself to change it.
    I could transform it or move it but it will not let me change the text itself or the text color.
    I'm using the PS cloud version and running Windows 7.
    I ran into this a few weeks ago, and rebooting my computer solved the problem -- or so I thought.  Apparently it didn't solve it permanently.
    Help, please!  This was due yesterday and my client is understandably not amused.
    Thanks.

    Now I can change text in any text box except the one titled "spinetext", which is highlighted in the layers panel.  Obviously I'm doing something wrong, but I've designed a lot of these covers, and never had trouble changing the spine text before.
    I finally had to recreate that layer in a new document and import it into this one -- but the text remains unchangeable in this layer.
    (For what it's worth, "Layer 1" is the template, which I turn off when I have inserted all the elements, so it has nothing to do with this layer.)
    Thanks for your help!

  • Why am I unable to change text color from black in LR5 book module?

    Why am I unable to change text color from black in LR5 Book Module?

    I'm assuming you clicked on the color patch besides the word <Character> to open the color picker window.
    At the right side of this window there is a vertical bar that has 2 horizontal black lines at the bottom.
    This is actually a slider. Pull it upwards with the color picker and color will appear in the window.

  • How to change text in PDF doc. which is a musical score

    Hello,
    I'm new here, so please excuse me if I do or say something I shouldn't.
    I need to change the words in a musical score because the font is too small. OCR recognition doesn"t work because there are illustrations that are different from images or text... Is there a way to get in there and make the changes I need to do?
    Any help greatly appreciated.

    Thanks for the reply, but I have Adobe Reader 9 Pro. Will it still not 
    work ?
    Le 29 sept. 2011 à 29 sept. 11 - 16:09, Claudio González a écrit :
    Re: How to change text in PDF doc. which is a musical score
    created by Claudio González in Adobe Reader - View the full discussion
    Unfortunately, not with the free Reader.
    Replies to this message go to everyone subscribed to this thread, 
    not directly to the person who posted the message. To post a reply, 
    either reply to this email or visit the message page: [http://forums.adobe.com/message/3944833#3944833
    To unsubscribe from this thread, please visit the message page at [http://forums.adobe.com/message/3944833#3944833
    ]. In the Actions box on the right, click the Stop Email 
    Notifications link.
    Start a new discussion in Adobe Reader by email or at Adobe Forums
    For more information about maintaining your forum email 
    notifications please go to http://forums.adobe.com/message/2936746#2936746

  • How do I change Text Colour in a Spreadsheet?  The Help menu doesn't help.

    Simple question whcih i cannot find the simple answer to:  How do I change Text Colour in a Spreadsheet?  The Help menu doesn't help.

    Hi Lecia,
    You have several choices.
    Use the first set of controls in the Format Bar. One of these is a Color well (red in the image). Select the cell(s) in which you want the text coloured, then click the well to open its Color palette, and choose your colour.
    Use the Text Inspector. Open the inspector, click the Text button (T), and use the tools there (similar to the set in the Format Bar).
    Press command-T to open the Fonts Window. This offers a few more options than are available in the Inspector or the Format bar.
    Regarding "Help": I'd recommend using the Numbers '09 User Guide, which you can download via the Help menu. Easier to search, and easier reading than the individual Help articles. search 'text color' to quickly get to instructions on applying colour to text.
    Regards,
    Barry

  • How to change text in banners

    How to change text in banners

    drag the template in a new project
    then …
    … click on the tiny grey triangle aside 'Banner01', and 'Banner Group'
    this 'unfolds' grouped content
    select/double click 'text here' ...
    type your text

  • Photoshop Elements 10 editor lags... doesn't show changes until you click a different tool?

    I've been using PSE for many years now... started in 3, moved to 7, and just upgraded to 10. I got it all installed fine, but when I open a file to edit it in the editor, and make a change (add text, change text, run action, erase something, ANYthing I do to the file) the changes don't show until I click a different tool. This is VERY frustrating and there's no way  will be able to use it if that's just how 10 works... but if it's a preference somehow I can't find it! Anyone know what's going on? I can try to explain further if this doesn't make sense.
    Thanks in advance!
    Maggie

    Try resetting prefernces
    http://help.adobe.com/en_US/PhotoshopElements/8.0/Win/Using/WS3427C0BF-03F8-421b-8CDF-6AC4 D42C9983_WIN.html
    http://www.northlite.net/ps/prefs.htm

  • How to change text variable value in bw3.5 query

    Hi Friends,
    I want to change the text variable value in query designer.
    My requirement is Header it's showing 2008 actual but it should 2007 actual.
    Siri

    Dear Siri,
    include it into some header and you will have
    &<your text variable>& - click on the same and a drop down will come asking you to edit or remove the same and choose edit.
    Hope this helps u..
    Best Regards,
    VVenkat..

  • Why can't I adjust the scale of my text by clicking and dragging the corner boxes?

    Why can't I adjust the scale of my text by clicking and dragging the corner boxes? Why I have the text selected, all it does it let me highlight it to change font, size, etc, OR all I can do is move it throughout the artboard. Why can I click and drag the corner box to adjust?
    M

    It's because you have a paragraph text box and it doesn't automatically resize text. This way you can change the margins of the text without resizing it which is how paragraph text functions by default.
    I'm not seeing the new text paragraph/area indicator on your text box, which is what you get in Illustrator CC, so the only way to convert this text so you can resize it by dragging on the corners is to copy the text, deselect the text box, use the text tool to click once in another part of your document, and then paste the text. The text will then come into your document as one long line if you don't have hard returns in it, but after reflowing the text manually you'll be able to drag the corners to resize the text.
    I would recommend not going this route as any text you remove from the area type means that the rest of the text has to be manually adjusted to maintain correct margins. Instead just resize the bounds of the paragraph text and adjust the size of the font in the Character panel.

  • Retrieving the Change Texts per Line Item (Purchase Order) - Very urgent

    Hi,
    How do you retrieve the Change Texts per Line Item (Purchase Order).
    Table T166T does not list these values per line item.
    Please help. This is very urgent & important.
    Best Regards,
    John

    if you are lookin out for change of item texts ...
    then use the function module ... READ_TEXT.
    and 2 tables r used ... STXH and TLINE ....
    double click on item data ...
    goto PO TEXT tab ....
    double click on text ...
    from menu ...
    goto header ... u'll get 4 fields that u need to consider ...
    TDID
    TDOBJECT
    TDHEAD
    TDNAME
    ALL THESE U'LL FIND IN  STXH
    ITEM TEXT is stored in TLINE
    Edited by: anjali rana on Mar 5, 2008 4:55 AM

  • Change text for radio button

    Hi all,
    Can we change text of radio button in selection screen after pressing push button?
    On screen, I will have push button for user to select one of two conditions, after selecting, I want radio button text be changed, for example : text > 'upload' will be changed to become 'upload sales'.
    can we?
    thanks
    Alia

    Hi alia,
    1. Very simple.
    2. The Important thing is
        NAME of the RADIO BUTTON.
    eg. name is XYZ.
         then we can access it in program like this :
        %_XYZ_%_app_%-text = 'Hello Sir'.
      (Please note the FORMAT - Its important)
    3. try this code (just copy paste in new program)
      IT WILL CHANGE TEXT OF RADIO BUTTONS
      WHEN PUSHBUTTON IS CLICKED.
    REPORT abc.
    PARAMETERS : abc  RADIOBUTTON GROUP g1,
                 xyz  RADIOBUTTON GROUP g1.
    SELECTION-SCREEN : PUSHBUTTON /15(25) pb USER-COMMAND pp .
    ABC, XYZ
    AT SELECTION-SCREEN .
      IF sy-ucomm = 'PP'.
        %_abc_%_app_%-text = 'Hello Sir'.
        %_xyz_%_app_%-text = 'How are u ?'.
      ENDIF.
    regards,
    amit m.

  • Change Text on Tab of Tabbed Panel When it's Open.

    I posted this on the DW board but it was suggested I try here.
    I am using a tabbed panel to hide and reveal a page of text on this page: www.imagesandwords.org.uk/Don/pages/essay.php
    The reason I am using the tabbed panel to reveal the page is to try to keep every page looking the same throughout the site.
    When the panel is open the text in the tab still says, "More" and I wonder if there is a way to make it say, "Hide" or something when it's open.  Although it isn't uploaded yet my last task was to put tiny up and down arrows in the tab so that helps with a down arrow on closed and an up arrow on open.
    As well as the question about changing the text on the tab, is there anything wrong with using the tabbed panel like this?  I guess it might be clunky if the user has javascript turned off but I''m thinking of putting up a .pdf for download once the content is dealth with.
    Kind regards
    Martin

    Hi Martin,
    The error is very genuine and need to be fixed.
    You know what the problem is...
    We are calling same funtion from a span that is inside a div which is again calling the same funtion. So the innerHTML is not getting updated correctly.
    So what we need to do is to duplicate our JS funtion and call name it as say....cchange()
    /* for the Tab/DIV based click*/
    function change(){
    var temp=document.getElementById('moreContent').innerHTML;
    if(temp=='More...'){
    document.getElementById('moreContent').innerHTML='Hide...';
    if(temp=='Hide...'){
          document.getElementById('moreContent').innerHTML= 'More...';
    /* for the span/text based click*/
    function cchange(){
    var temp=document.getElementById('moreContent').innerHTML;
    if(temp=='More...'){
    document.getElementById('moreContent').innerHTML='Hide...';
    if(temp=='Hide...'){
         document.getElementById('moreContent').innerHTML= 'More...';
    and in our HTML it becomes
    <div class="CollapsiblePanelTab" onclick="change();"><span id="moreContent" onclick="ccchange();">More...</span> </div>
    This should finally do the required icing on cake
    Regards,
    Vinay

  • HELP!Can't change text color photoshop 3d

    Hi everyone!
    I am having a problem with Photoshop CC and the 3d text extrusion. I've never been able to change the color of my text using the Color Picker or changing the text color by going into the "Edit Source" feature and manually changing it. Neither of these have any effect on my text color. The only way I've found to change my text color is by selecting the Diffuse color under my Front Inflation Materials.
    The screenshots below will show my settings and problems.
    The first step is creating the 3d Extrusion text layer. I have selected below the word Beach in a dark grey.
    The next step is after the 3d Extrusion layer is made, I am trying to change the color of my 3d text to a red. So I'm highlighting my text layer, going to the 3d Text Color picker and selecting red. The box above shows the red that I've selected, and below the little thumbnail also shows red. My problem is that after I press "Ok", the small red box below next to text reverts back to the original dark grey and doesn't change.
    The 3rd step and the other way I'm trying to get my text color to change is by clicking on the "Edit Source" button, going into the .psb, manually changing my text color to red, saving and closing the window. The text color still does not show my changes. It remains the original dark grey color that I originally had. Now, if I go back into "Edit Source" my text is red, but it won't show the changes on the 3d layer.
    Am I doing something wrong, or is there something I'm missing? Thank you guys in advance.
    -Terry

    I'm with you XM Just got Steve Caplin's book on 3d Photoshop and he says you can easily change the color as shown in  that video —although I am getting different color picker. note the properties panel (on right) the color swatch shows pink once I click OK it reverts back to original color

Maybe you are looking for