Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple input prompt

    sorry if this is a frequent question, but I couldnt find it in the forums. I'm trying to make a single prompt window with two input values. Right now I have the two values in two consecutive prompts... here is the function:

    Code:
    function addImage() {
    
     var imagename = prompt('Image Name:', '');
     var text = prompt('Link text:', '');
     
     if(text == '')
     {
     text = imagename;
     }
    
    document.update.body.value+="[image="+imagename+"]"+text+"[/image]";
    }
    Thanks for any help.

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    There are no multi-prompt modal windows in javascript. Sorry

    You'll have to come up with a different solution if you don't want a two step process, like a form in a div that you can hide after the user enters the data.


  •  

    Posting Permissions

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