www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] Popup Textbox

  1. #1
    Join Date
    May 2009
    Location
    Hampshire, UK
    Posts
    277

    resolved [RESOLVED] Popup Textbox

    Another very quick question, how would I go about putting into my website a popup that has a textbox within it. Not a custom popup, a box like an 'alert' box.

    An example of this can be seen when one clicks on the 'insert hyperlink' button on the text editor on this website.

    I hope this makes sense, thanks in advance

    Ben

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,356

    Question Is this what you have in mind? ...

    Are you looking for something like this from: http://www.w3schools.com/JS/js_popup.asp

    See the 'Prompt Box' section:
    Code:
    <html>
    <head>
    <script type="text/javascript">
    function show_prompt()
    {
    var name=prompt("Please enter your name","Harry Potter");
    if (name!=null && name!="")
      {
      document.write("Hello " + name + "! How are you today?");
      }
    }
    </script>
    </head>
    <body>
    
    <input type="button" onclick="show_prompt()" value="Show a prompt box" />
    
    </body>
    </html>

  3. #3
    Join Date
    May 2009
    Location
    Hampshire, UK
    Posts
    277
    Thats perfect, thanks very much

  4. #4
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,356
    You're most welcome.
    Glad I was able to help.
    Good Luck!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles