Incrementing timer time on form submit












0














So I have a page on which user can look at a certain item, and on that page, he can see the time remaining on a countdown timer (which is done in js script), and make a bid for that item by clicking on the "make a bid" button. By doing so, time for making bids for that item is incremented. So when he does that, he is automatically redirected to the same page and everything is reloaded and the timer shows incremented time correctly. But, for example, other users can also make bids, then, the certain user also needs to see time incremented while on the page when other users make bids. I am trying to do this via Pusher and Echo. So far, Pusher and Echo are working fine. I just need somehow to reload variable deadline in the script via Echo and make clock initialaze again whenewher an auction is made. How can I make that variable assings itself a new value whenever anyone makes a bid?
Here is what I have done



auction.blade.php



@extends('layouts.front')

@section('content')
<div>
<h2>
{{ $auction->name }}
</h2>
<hr>
<div class="row">
<div>
<table class="table table-aukcija table-clear">
<tbody>
<tr>
<td>Time remaining:</td>
<td class="counter_polje">
<strong id="clockdiv"></strong>
<br>
<small><em>( {{ date($auction->end_date) }} )</em></small>
</td>
</tr>
<tr>
<td>Num of offers:</td>
<td>{{ $auction->offers }} offers
</tr>
</tbody></table>

<table class="table table-aukcija table-nudjenje table-clear">
<tbody>
<tr>
<td colspan="2" class="table-nudjenje-biding">

<form id="formMojaPonuda" name="formMojaPonuda" action="{{ asset('/auctions/'.$auction->id.'/offer') }}" method="POST" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="input-group">
<input type="hidden" name="minBid" id="minBid" value="{{ $auction->id }}">
<input type="hidden" name="minBid" id="minBid" value="{{ $auction->name }}">
<input type="hidden" name="minBid" id="minBid" value="{{ $auction->descript }}">
<input type="hidden" name="minBid" id="minBid" value="{{ $auction->price }}">
<input type="hidden" name="minBid" id="minBid" value="{{ $auction->end_date }}">
<input name="txtIznos" id="bidValue" type="text" autocomplete="off" placeholder="(min. RSD 1.50)" class="form-control">
<span class="input-group-btn">
<button type="submit" class="btn btn-success">Make a bid</button>
</span>
</div>
</form></td></tr></tbody></table></div></div></div></div>

<div id="app"></div>
<script src="{{ asset('js/app.js') }}"></script>

<script type="text/javascript">
Echo.channel('auctions')
.listen('AuctionMade', e => {
console.log('Auction has been made');
console.log(e);
});
</script>

<script type="text/javascript">
//var deadline = 'September 31 2018 23:59:59 GMT+0100';
var deadline = '<?php echo date($auction->end_date) ?>';
getTimeRemaining(endtime){
var t = Date.parse(endtime) - Date.parse(new Date());
var seconds = Math.floor( (t/1000) % 60 );
var minutes = Math.floor( (t/1000/60) % 60 );
var hours = Math.floor( (t/(1000*60*60)) % 24 );
var days = Math.floor( t/(1000*60*60*24) );
return {
'total': t,
'days': days,
'hours': hours,
'minutes': minutes,
'seconds': seconds
};
}

function initializeClock(id, endtime){
var clock = document.getElementById(id);
var timeinterval = setInterval(function(){
var t = getTimeRemaining(endtime);
/* clock.innerHTML = 'days: ' + t.days + '<br>' +
'hours: '+ t.hours + '<br>' +
'minutes: ' + t.minutes + '<br>' +
'seconds: ' + t.seconds;
*/
clock.innerHTML = t.days + ' dana ' +
t.hours + ' sati '+
t.minutes + ' minuta ' +
t.seconds + ' sekundi ';
if(t.total<=0){
clearInterval(timeinterval);
}
},1000);
}

initializeClock('clockdiv', deadline);

</script>
@endsection


AuctionMade.php



class AuctionMade implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;

/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}

/**
* Get the channels the event should broadcast on.
*
* @return Channel|array
*/
public function broadcastOn()
{
return new Channel('auctions');
}


}



Auction.php (model)



class Auction
{

public $id;
public $name;
public $descript;
public $meta_name;
public $meta_keyword;
public $price;
public $pic;
public $end_date;
public $offers;
public $offered_by;

public function getAll(){
$result =
DB::table('auctions')
->select('*')
->get();
return $result;
}

public function get(){
$result =
DB::table('auctions')
->select('*')
->where('id', '=', $this->id)
->first();
return $result;
}

//********************** COUNTS NUMBER OF AUCTIONS *****************************

public static function count(){
$result =
DB::table('auctions')
->count();
return $result;
}

public function increment($id){
$result =
DB::table('auctions')
->where('id', $id)
->update([
'offers' => DB::raw('offers + 1'),
'offered_by' => $this->offered_by,
'end_date' => $this->end_date
]);
return $result;
}


}



AuctionController.php



class AuctionController extends Controller
{

private $data = ;

public function show($id)
{
$auction = new Auction();
$auction->id = $id;
$this->data['auction'] = $auction->get();
return view('pages.auction', $this->data);
}

public function offer($id, Request $request){
$auction = new Auction();
$auction->id = $id;
$offered_by = $request->session()->get('user', 'id')[0];
$auction->offered_by = $offered_by->id;
$auction->end_date = Carbon::parse($auction->get()->end_date)->addSecond(7);
$auction->increment($id);
AuctionMade::dispatch();
return redirect()->route('auctionSingle', ['id' => $id]);
}


}










share|improve this question





























    0














    So I have a page on which user can look at a certain item, and on that page, he can see the time remaining on a countdown timer (which is done in js script), and make a bid for that item by clicking on the "make a bid" button. By doing so, time for making bids for that item is incremented. So when he does that, he is automatically redirected to the same page and everything is reloaded and the timer shows incremented time correctly. But, for example, other users can also make bids, then, the certain user also needs to see time incremented while on the page when other users make bids. I am trying to do this via Pusher and Echo. So far, Pusher and Echo are working fine. I just need somehow to reload variable deadline in the script via Echo and make clock initialaze again whenewher an auction is made. How can I make that variable assings itself a new value whenever anyone makes a bid?
    Here is what I have done



    auction.blade.php



    @extends('layouts.front')

    @section('content')
    <div>
    <h2>
    {{ $auction->name }}
    </h2>
    <hr>
    <div class="row">
    <div>
    <table class="table table-aukcija table-clear">
    <tbody>
    <tr>
    <td>Time remaining:</td>
    <td class="counter_polje">
    <strong id="clockdiv"></strong>
    <br>
    <small><em>( {{ date($auction->end_date) }} )</em></small>
    </td>
    </tr>
    <tr>
    <td>Num of offers:</td>
    <td>{{ $auction->offers }} offers
    </tr>
    </tbody></table>

    <table class="table table-aukcija table-nudjenje table-clear">
    <tbody>
    <tr>
    <td colspan="2" class="table-nudjenje-biding">

    <form id="formMojaPonuda" name="formMojaPonuda" action="{{ asset('/auctions/'.$auction->id.'/offer') }}" method="POST" enctype="multipart/form-data">
    {{ csrf_field() }}
    <div class="input-group">
    <input type="hidden" name="minBid" id="minBid" value="{{ $auction->id }}">
    <input type="hidden" name="minBid" id="minBid" value="{{ $auction->name }}">
    <input type="hidden" name="minBid" id="minBid" value="{{ $auction->descript }}">
    <input type="hidden" name="minBid" id="minBid" value="{{ $auction->price }}">
    <input type="hidden" name="minBid" id="minBid" value="{{ $auction->end_date }}">
    <input name="txtIznos" id="bidValue" type="text" autocomplete="off" placeholder="(min. RSD 1.50)" class="form-control">
    <span class="input-group-btn">
    <button type="submit" class="btn btn-success">Make a bid</button>
    </span>
    </div>
    </form></td></tr></tbody></table></div></div></div></div>

    <div id="app"></div>
    <script src="{{ asset('js/app.js') }}"></script>

    <script type="text/javascript">
    Echo.channel('auctions')
    .listen('AuctionMade', e => {
    console.log('Auction has been made');
    console.log(e);
    });
    </script>

    <script type="text/javascript">
    //var deadline = 'September 31 2018 23:59:59 GMT+0100';
    var deadline = '<?php echo date($auction->end_date) ?>';
    getTimeRemaining(endtime){
    var t = Date.parse(endtime) - Date.parse(new Date());
    var seconds = Math.floor( (t/1000) % 60 );
    var minutes = Math.floor( (t/1000/60) % 60 );
    var hours = Math.floor( (t/(1000*60*60)) % 24 );
    var days = Math.floor( t/(1000*60*60*24) );
    return {
    'total': t,
    'days': days,
    'hours': hours,
    'minutes': minutes,
    'seconds': seconds
    };
    }

    function initializeClock(id, endtime){
    var clock = document.getElementById(id);
    var timeinterval = setInterval(function(){
    var t = getTimeRemaining(endtime);
    /* clock.innerHTML = 'days: ' + t.days + '<br>' +
    'hours: '+ t.hours + '<br>' +
    'minutes: ' + t.minutes + '<br>' +
    'seconds: ' + t.seconds;
    */
    clock.innerHTML = t.days + ' dana ' +
    t.hours + ' sati '+
    t.minutes + ' minuta ' +
    t.seconds + ' sekundi ';
    if(t.total<=0){
    clearInterval(timeinterval);
    }
    },1000);
    }

    initializeClock('clockdiv', deadline);

    </script>
    @endsection


    AuctionMade.php



    class AuctionMade implements ShouldBroadcast
    {
    use Dispatchable, InteractsWithSockets, SerializesModels;

    /**
    * Create a new event instance.
    *
    * @return void
    */
    public function __construct()
    {
    //
    }

    /**
    * Get the channels the event should broadcast on.
    *
    * @return Channel|array
    */
    public function broadcastOn()
    {
    return new Channel('auctions');
    }


    }



    Auction.php (model)



    class Auction
    {

    public $id;
    public $name;
    public $descript;
    public $meta_name;
    public $meta_keyword;
    public $price;
    public $pic;
    public $end_date;
    public $offers;
    public $offered_by;

    public function getAll(){
    $result =
    DB::table('auctions')
    ->select('*')
    ->get();
    return $result;
    }

    public function get(){
    $result =
    DB::table('auctions')
    ->select('*')
    ->where('id', '=', $this->id)
    ->first();
    return $result;
    }

    //********************** COUNTS NUMBER OF AUCTIONS *****************************

    public static function count(){
    $result =
    DB::table('auctions')
    ->count();
    return $result;
    }

    public function increment($id){
    $result =
    DB::table('auctions')
    ->where('id', $id)
    ->update([
    'offers' => DB::raw('offers + 1'),
    'offered_by' => $this->offered_by,
    'end_date' => $this->end_date
    ]);
    return $result;
    }


    }



    AuctionController.php



    class AuctionController extends Controller
    {

    private $data = ;

    public function show($id)
    {
    $auction = new Auction();
    $auction->id = $id;
    $this->data['auction'] = $auction->get();
    return view('pages.auction', $this->data);
    }

    public function offer($id, Request $request){
    $auction = new Auction();
    $auction->id = $id;
    $offered_by = $request->session()->get('user', 'id')[0];
    $auction->offered_by = $offered_by->id;
    $auction->end_date = Carbon::parse($auction->get()->end_date)->addSecond(7);
    $auction->increment($id);
    AuctionMade::dispatch();
    return redirect()->route('auctionSingle', ['id' => $id]);
    }


    }










    share|improve this question



























      0












      0








      0







      So I have a page on which user can look at a certain item, and on that page, he can see the time remaining on a countdown timer (which is done in js script), and make a bid for that item by clicking on the "make a bid" button. By doing so, time for making bids for that item is incremented. So when he does that, he is automatically redirected to the same page and everything is reloaded and the timer shows incremented time correctly. But, for example, other users can also make bids, then, the certain user also needs to see time incremented while on the page when other users make bids. I am trying to do this via Pusher and Echo. So far, Pusher and Echo are working fine. I just need somehow to reload variable deadline in the script via Echo and make clock initialaze again whenewher an auction is made. How can I make that variable assings itself a new value whenever anyone makes a bid?
      Here is what I have done



      auction.blade.php



      @extends('layouts.front')

      @section('content')
      <div>
      <h2>
      {{ $auction->name }}
      </h2>
      <hr>
      <div class="row">
      <div>
      <table class="table table-aukcija table-clear">
      <tbody>
      <tr>
      <td>Time remaining:</td>
      <td class="counter_polje">
      <strong id="clockdiv"></strong>
      <br>
      <small><em>( {{ date($auction->end_date) }} )</em></small>
      </td>
      </tr>
      <tr>
      <td>Num of offers:</td>
      <td>{{ $auction->offers }} offers
      </tr>
      </tbody></table>

      <table class="table table-aukcija table-nudjenje table-clear">
      <tbody>
      <tr>
      <td colspan="2" class="table-nudjenje-biding">

      <form id="formMojaPonuda" name="formMojaPonuda" action="{{ asset('/auctions/'.$auction->id.'/offer') }}" method="POST" enctype="multipart/form-data">
      {{ csrf_field() }}
      <div class="input-group">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->id }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->name }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->descript }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->price }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->end_date }}">
      <input name="txtIznos" id="bidValue" type="text" autocomplete="off" placeholder="(min. RSD 1.50)" class="form-control">
      <span class="input-group-btn">
      <button type="submit" class="btn btn-success">Make a bid</button>
      </span>
      </div>
      </form></td></tr></tbody></table></div></div></div></div>

      <div id="app"></div>
      <script src="{{ asset('js/app.js') }}"></script>

      <script type="text/javascript">
      Echo.channel('auctions')
      .listen('AuctionMade', e => {
      console.log('Auction has been made');
      console.log(e);
      });
      </script>

      <script type="text/javascript">
      //var deadline = 'September 31 2018 23:59:59 GMT+0100';
      var deadline = '<?php echo date($auction->end_date) ?>';
      getTimeRemaining(endtime){
      var t = Date.parse(endtime) - Date.parse(new Date());
      var seconds = Math.floor( (t/1000) % 60 );
      var minutes = Math.floor( (t/1000/60) % 60 );
      var hours = Math.floor( (t/(1000*60*60)) % 24 );
      var days = Math.floor( t/(1000*60*60*24) );
      return {
      'total': t,
      'days': days,
      'hours': hours,
      'minutes': minutes,
      'seconds': seconds
      };
      }

      function initializeClock(id, endtime){
      var clock = document.getElementById(id);
      var timeinterval = setInterval(function(){
      var t = getTimeRemaining(endtime);
      /* clock.innerHTML = 'days: ' + t.days + '<br>' +
      'hours: '+ t.hours + '<br>' +
      'minutes: ' + t.minutes + '<br>' +
      'seconds: ' + t.seconds;
      */
      clock.innerHTML = t.days + ' dana ' +
      t.hours + ' sati '+
      t.minutes + ' minuta ' +
      t.seconds + ' sekundi ';
      if(t.total<=0){
      clearInterval(timeinterval);
      }
      },1000);
      }

      initializeClock('clockdiv', deadline);

      </script>
      @endsection


      AuctionMade.php



      class AuctionMade implements ShouldBroadcast
      {
      use Dispatchable, InteractsWithSockets, SerializesModels;

      /**
      * Create a new event instance.
      *
      * @return void
      */
      public function __construct()
      {
      //
      }

      /**
      * Get the channels the event should broadcast on.
      *
      * @return Channel|array
      */
      public function broadcastOn()
      {
      return new Channel('auctions');
      }


      }



      Auction.php (model)



      class Auction
      {

      public $id;
      public $name;
      public $descript;
      public $meta_name;
      public $meta_keyword;
      public $price;
      public $pic;
      public $end_date;
      public $offers;
      public $offered_by;

      public function getAll(){
      $result =
      DB::table('auctions')
      ->select('*')
      ->get();
      return $result;
      }

      public function get(){
      $result =
      DB::table('auctions')
      ->select('*')
      ->where('id', '=', $this->id)
      ->first();
      return $result;
      }

      //********************** COUNTS NUMBER OF AUCTIONS *****************************

      public static function count(){
      $result =
      DB::table('auctions')
      ->count();
      return $result;
      }

      public function increment($id){
      $result =
      DB::table('auctions')
      ->where('id', $id)
      ->update([
      'offers' => DB::raw('offers + 1'),
      'offered_by' => $this->offered_by,
      'end_date' => $this->end_date
      ]);
      return $result;
      }


      }



      AuctionController.php



      class AuctionController extends Controller
      {

      private $data = ;

      public function show($id)
      {
      $auction = new Auction();
      $auction->id = $id;
      $this->data['auction'] = $auction->get();
      return view('pages.auction', $this->data);
      }

      public function offer($id, Request $request){
      $auction = new Auction();
      $auction->id = $id;
      $offered_by = $request->session()->get('user', 'id')[0];
      $auction->offered_by = $offered_by->id;
      $auction->end_date = Carbon::parse($auction->get()->end_date)->addSecond(7);
      $auction->increment($id);
      AuctionMade::dispatch();
      return redirect()->route('auctionSingle', ['id' => $id]);
      }


      }










      share|improve this question















      So I have a page on which user can look at a certain item, and on that page, he can see the time remaining on a countdown timer (which is done in js script), and make a bid for that item by clicking on the "make a bid" button. By doing so, time for making bids for that item is incremented. So when he does that, he is automatically redirected to the same page and everything is reloaded and the timer shows incremented time correctly. But, for example, other users can also make bids, then, the certain user also needs to see time incremented while on the page when other users make bids. I am trying to do this via Pusher and Echo. So far, Pusher and Echo are working fine. I just need somehow to reload variable deadline in the script via Echo and make clock initialaze again whenewher an auction is made. How can I make that variable assings itself a new value whenever anyone makes a bid?
      Here is what I have done



      auction.blade.php



      @extends('layouts.front')

      @section('content')
      <div>
      <h2>
      {{ $auction->name }}
      </h2>
      <hr>
      <div class="row">
      <div>
      <table class="table table-aukcija table-clear">
      <tbody>
      <tr>
      <td>Time remaining:</td>
      <td class="counter_polje">
      <strong id="clockdiv"></strong>
      <br>
      <small><em>( {{ date($auction->end_date) }} )</em></small>
      </td>
      </tr>
      <tr>
      <td>Num of offers:</td>
      <td>{{ $auction->offers }} offers
      </tr>
      </tbody></table>

      <table class="table table-aukcija table-nudjenje table-clear">
      <tbody>
      <tr>
      <td colspan="2" class="table-nudjenje-biding">

      <form id="formMojaPonuda" name="formMojaPonuda" action="{{ asset('/auctions/'.$auction->id.'/offer') }}" method="POST" enctype="multipart/form-data">
      {{ csrf_field() }}
      <div class="input-group">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->id }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->name }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->descript }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->price }}">
      <input type="hidden" name="minBid" id="minBid" value="{{ $auction->end_date }}">
      <input name="txtIznos" id="bidValue" type="text" autocomplete="off" placeholder="(min. RSD 1.50)" class="form-control">
      <span class="input-group-btn">
      <button type="submit" class="btn btn-success">Make a bid</button>
      </span>
      </div>
      </form></td></tr></tbody></table></div></div></div></div>

      <div id="app"></div>
      <script src="{{ asset('js/app.js') }}"></script>

      <script type="text/javascript">
      Echo.channel('auctions')
      .listen('AuctionMade', e => {
      console.log('Auction has been made');
      console.log(e);
      });
      </script>

      <script type="text/javascript">
      //var deadline = 'September 31 2018 23:59:59 GMT+0100';
      var deadline = '<?php echo date($auction->end_date) ?>';
      getTimeRemaining(endtime){
      var t = Date.parse(endtime) - Date.parse(new Date());
      var seconds = Math.floor( (t/1000) % 60 );
      var minutes = Math.floor( (t/1000/60) % 60 );
      var hours = Math.floor( (t/(1000*60*60)) % 24 );
      var days = Math.floor( t/(1000*60*60*24) );
      return {
      'total': t,
      'days': days,
      'hours': hours,
      'minutes': minutes,
      'seconds': seconds
      };
      }

      function initializeClock(id, endtime){
      var clock = document.getElementById(id);
      var timeinterval = setInterval(function(){
      var t = getTimeRemaining(endtime);
      /* clock.innerHTML = 'days: ' + t.days + '<br>' +
      'hours: '+ t.hours + '<br>' +
      'minutes: ' + t.minutes + '<br>' +
      'seconds: ' + t.seconds;
      */
      clock.innerHTML = t.days + ' dana ' +
      t.hours + ' sati '+
      t.minutes + ' minuta ' +
      t.seconds + ' sekundi ';
      if(t.total<=0){
      clearInterval(timeinterval);
      }
      },1000);
      }

      initializeClock('clockdiv', deadline);

      </script>
      @endsection


      AuctionMade.php



      class AuctionMade implements ShouldBroadcast
      {
      use Dispatchable, InteractsWithSockets, SerializesModels;

      /**
      * Create a new event instance.
      *
      * @return void
      */
      public function __construct()
      {
      //
      }

      /**
      * Get the channels the event should broadcast on.
      *
      * @return Channel|array
      */
      public function broadcastOn()
      {
      return new Channel('auctions');
      }


      }



      Auction.php (model)



      class Auction
      {

      public $id;
      public $name;
      public $descript;
      public $meta_name;
      public $meta_keyword;
      public $price;
      public $pic;
      public $end_date;
      public $offers;
      public $offered_by;

      public function getAll(){
      $result =
      DB::table('auctions')
      ->select('*')
      ->get();
      return $result;
      }

      public function get(){
      $result =
      DB::table('auctions')
      ->select('*')
      ->where('id', '=', $this->id)
      ->first();
      return $result;
      }

      //********************** COUNTS NUMBER OF AUCTIONS *****************************

      public static function count(){
      $result =
      DB::table('auctions')
      ->count();
      return $result;
      }

      public function increment($id){
      $result =
      DB::table('auctions')
      ->where('id', $id)
      ->update([
      'offers' => DB::raw('offers + 1'),
      'offered_by' => $this->offered_by,
      'end_date' => $this->end_date
      ]);
      return $result;
      }


      }



      AuctionController.php



      class AuctionController extends Controller
      {

      private $data = ;

      public function show($id)
      {
      $auction = new Auction();
      $auction->id = $id;
      $this->data['auction'] = $auction->get();
      return view('pages.auction', $this->data);
      }

      public function offer($id, Request $request){
      $auction = new Auction();
      $auction->id = $id;
      $offered_by = $request->session()->get('user', 'id')[0];
      $auction->offered_by = $offered_by->id;
      $auction->end_date = Carbon::parse($auction->get()->end_date)->addSecond(7);
      $auction->increment($id);
      AuctionMade::dispatch();
      return redirect()->route('auctionSingle', ['id' => $id]);
      }


      }







      javascript php laravel echo pusher






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 at 17:09









      Sayed Mohd Ali

      6441316




      6441316










      asked Nov 12 at 16:44









      Младен Карић

      98




      98





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266572%2fincrementing-timer-time-on-form-submit%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266572%2fincrementing-timer-time-on-form-submit%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Xamarin.iOS Cant Deploy on Iphone

          Glorious Revolution

          Dulmage-Mendelsohn matrix decomposition in Python