• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can we make our user specific prompt in javaScript?

 
Greenhorn
Posts: 10
MyEclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need a prompt having two field say Username and password?
Is this possible in javaScript? How?
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no native means to do so; the window.prompt() method only accepts a single value.

It is of course completely possible to create your own overlay that acts like a modal dialog using a combination of HTML, CSS and JavaScript.

That's kinda tricky unless you're already on your way to becoming a JavaScript ninja. You might be better off using an existing implementation.

P.S. Don't fall into the trap of using IE's showModalDialog() unless you never plan for your pages to work in any browser other than IE.
 
reply
    Bookmark Topic Watch Topic
  • New Topic