multiple inputs in an input box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tolkienarda
    Contributor
    • Dec 2006
    • 316

    multiple inputs in an input box

    hi all i've seen what appears to be a prompt box with two inputs, and either i am realy stupid cause i don't know how to do it or they werent using a prompt box. if i am stupid and it is easy please help the ignorant but if there is somthing tricky i need to do then please save me.

    thanks
    eirc
  • b1randon
    Recognized Expert New Member
    • Dec 2006
    • 171

    #2
    Originally posted by tolkienarda
    hi all i've seen what appears to be a prompt box with two inputs, and either i am realy stupid cause i don't know how to do it or they werent using a prompt box. if i am stupid and it is easy please help the ignorant but if there is somthing tricky i need to do then please save me.

    thanks
    eirc
    As far as I know you can only prompt for one response at a time. You can do several in a row but not in the same window.

    Comment

    • Asghar baig
      New Member
      • Jan 2007
      • 13

      #3
      ithink you want to say that "using prompt for more then one input with only one statement"
      you have to do
      Code:
      <script>
      ja=new Array(5);
      var as = "The names you entered are";
      for(a=0;a<ja.length;a++) {
      ja[a]=prompt("Enter Name"+a,"");
      as += "\n" + a +"Array["+a+"]=" + ja[a];
      }
      document.write("The values u enterd are"+a+as);
      //this will have five  value and show it
      </script>

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by tolkienarda
        hi all i've seen what appears to be a prompt box with two inputs, and either i am realy stupid cause i don't know how to do it or they werent using a prompt box. if i am stupid and it is easy please help the ignorant but if there is somthing tricky i need to do then please save me.

        thanks
        eirc
        Perhaps, the person used DHTML to display the prompt as a div using two text boxes?

        Comment

        Working...