1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

View Progress bar

Discussion in 'jQuery' started by piropeator, Jul 15, 2016.

  1. #1
    Hi guys.
    I want to click one button "Process" and are sequentially executed several processes in php. Something like this:
    $process1 = new Process1();
    
    $p1 = $process1->result();
    
    $process2 = new Process2();
    $p2 = $process->result();
    
    $process3 = new Process3();
    $p3 = $process3->result();
    
    PHP:
    Meanwhile I want to show a Progress Bar (bootstrap) during this processes.
    How to do that?
     
    piropeator, Jul 15, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    First, do you have classes named process1, process2 and so on?

    But,it sounds like you could just do this via ajax: click the button, and for each result return something which will update the progress bar.
     
    PoPSiCLe, Jul 15, 2016 IP
  3. piropeator

    piropeator Well-Known Member

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #3
    And show a waiting page during all process??
     
    piropeator, Jul 16, 2016 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    You won't need a separate waiting page. Since you haven't really said anything about what this is supposed to do, and how long it's supposed to take, I have no idea if it's the smart or right way to do it.
     
    PoPSiCLe, Jul 17, 2016 IP
  5. piropeator

    piropeator Well-Known Member

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #5
    After that different treatment processes and calculations that are done internally and that takes a few seconds and meanwhile the system should display a waiting screen. Maybe not a progress bar but a waiting screen can be.
     
    piropeator, Jul 20, 2016 IP
  6. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #6
    Then just do a spinning logo before redirecting or showing some return / end result when it's finalized. A spinner is quite common, and if it's just a few seconds, that should be perfectly fine.
     
    PoPSiCLe, Jul 20, 2016 IP