Results 1 to 4 of 4

Thread: Getting prompt input value

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Getting prompt input value

    Hi guys, I have the following code on my page load event so the user can enter a date when they click button2.
    Code:
    Button2.Attributes.Add("onclick", "var dteDate = prompt('Enter Import Date');")
    My question is, how can I get this value they input when the code runs the server click event?

    Thanks
    David Wilhelm

  2. #2
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251

    Re: Getting prompt input value

    I don't think what you are attempting to do is possible or atleast I could not figure out a whay to do it. I have to ask why you prompt the user for this value instead of just placing a textbox on the page and going with that value. It would seem like it would be easier and you could use some of the ASP.NET validation controls to validate the value if it was required.
    ~Ryan





    Have I helped you? Please Rate my posts.

  3. #3
    New Member
    Join Date
    Dec 2004
    Posts
    8

    Re: Getting prompt input value

    I guess one way to do it is to place one hidden control in your form and get the value with the dim x as x =ctype(request.form("yourhiddenctl"),x) and in your script doing something like
    var x = document.getelementbyid("nameofyourhiddenctl");
    x=window.prompt("msg");
    hope this help

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Re: Getting prompt input value

    Bump, anyone know how to do this?
    David Wilhelm

Posting Permissions

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



Click Here to Expand Forum to Full Width