Java script Confoirmation box problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mvmashraf
    New Member
    • Oct 2007
    • 36

    Java script Confoirmation box problem

    Hai to aLL,

    I have a java script funtion,In that function i show a confirmation box,
    If the user click on "OK" certain action will be performed,

    Now turned to my problem if the user is not responding with in five minutes my "ok" button click event action need to invoke automatticcaly.

    Is it possible in java script , IF it possible any one can help me to solve the trap.

    By Ahsraf
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    This is really a javascript problem not a .NET one, but I don't think the inputbox has a timeout or anything, I think it sits there and blocks "forever"

    Comment

    • mvmashraf
      New Member
      • Oct 2007
      • 36

      #3
      Hai plater.

      Actualy the problem when the user didnt respond up to our browser 20 minutes i will pop one confirmation box,that says u are not responding last 20 minute are u wish to continue(its has ok and cancel button),Even though the user didnt respond for that confirmation five minute i need to activate the "cancel" event.(in that cancel event i had code for some actiont) , I think u got what actualy i meaned?

      Hopefully Ashraf

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        I got it. But it's all javascript and not .NET.

        What you could do is use some fancy html/css to make something that LOOKS like the inputbox, then just show/hide it when you want to. That wouldn't block the rest of the code from continueing on.

        Comment

        • kunal pawar
          Contributor
          • Oct 2007
          • 297

          #5
          U can try this one,

          In "Ok" event code u can checked session is expired or not if not then redirect to Cancel button action

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            You know, I don't think you need to do any postback at all. If after 20 minutes the user has not replied then your message should pop up asking the user to submit the page. If the user doesn't do anything then their session should just expire (they should be logged out).

            Are you having problems when the user is clicking "Ok" (indicate that they are still active on your page)?

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Originally posted by kunal pawar
              U can try this one,

              In "Ok" event code u can checked session is expired or not if not then redirect to Cancel button action
              Just to clarify, there is no .NET button event raised for a JavaScript's "OK" button in an Alert/Confirm box.

              Comment

              Working...