2 Replies Latest reply on Nov 25, 2010 12:00 PM by pali185

    Input "TextField" in JavaScript


      Hello, I would like to ask in view of JavaScript, and Adobe Photoshop namely the creation of any input TextField. I want to be an interactive script. I mean the script that creates a simple card, where previously we enter the name into the input TextField. Scripts created in the program ExtendScript Toolkit I would be glad if you write a simple script using said input TextField. Thank you

        • 1. Re: Input "TextField" in JavaScript
          jugenjury Level 2

          var myText=prompt("What do you want to say?","Hello World!","Input your text here");


          alert("You said: "+myText);


          In the above example, myText will be filled with whatever is typed into the input box. For the prompt() method, the format is as follows....


          prompt([prompt message],[default text],[title])


          prompt message will apear inside the prompt box and can be used for basic instructions, clarification, etc.

          default text will appear in the input box but can be changed.

          title will appear in the title area of the prompt box.


          Any of those fields can be left blank, but you must at least use the commas if you aren't going to include some of the fields. For example, if the only field you want to use is the title, you have to use prompt(,,"My Title").


          Hope this is what you want.

          • 2. Re: Input "TextField" in JavaScript
            pali185 Level 1

            Exactly what I was asking, thank you