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 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation two message Box in prompt

    Hi,
    Is there anyway i can have a java script one prompt but it will have two message box and two messages. SOmething like asking the user to put userid and password in one prompt instead of two.
    Thanks.

  • #2
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any one have any idea!

  • #3
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    As far as I know, JavaScript's Prompt can only accept one string. There's no way of having two input fields in one prompt using JavaScript. However, if you're looking to process a Username and Password, you'd be better off using an HTML Form or putting your webpage in a password protected area of your server if you have that option.

    -Shane

  • #4
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    thanks for the reply. this is not for user id or pass. I want to insert two DB field from one prompt or any other JS function if available. So I assume JS don't allow me to have two textfields. I wanted to clarify that.

  • #5
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    Wait now, this sounds different. Do you want a prompt where this popup asks for two things and then those are inserted into the DB? Or do you want a popup box that DISPLAYS two values from the DB? Because if you're displaying info, then that's easy. You can use a simple Alert box that just displays the values already grabbed from the DB. But if you're inputting info, then JavaScript only allows one field in its Prompt. However, for inputting, you can opt for making Javascript pop-up an HTML page with a form with two input fields that looks like a little pop-up page by disabling the Navigation bar and setting the height and width to a smaller size and such. This may be the effect you want. But then again, not sure exactly what you're looking for.

    -Shane

  • #6
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks again.
    I will be inputing from the prompt to the DB.
    Here is the scenerio.
    I am checking from a grade selection field if user enters 'WU'; I am asking them to put students last date of attendance and a comment as a prompt. I wanted to display them in one prompt.

  • #7
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    Well, if you would like to pop up a window that would input those two fields into the database, you could make a new html page with a form that submits to whatever you're using to access the DB that has those two input fields. Check out the link below on how to create this window. It shows you how to set it up, communicate to it, etc. This may be what you're looking for.

    ->Here<-

    -Shane

  • #8
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks a lot. I might use the pop ups with two times. That might be little easier. Thanks anyway.


  •  

    Posting Permissions

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