Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Remove localStorage with setTime not working

I have this remote js code

<% if @error_message.present? %>
$('#message').html('<div class="text-danger"><%= j @error_message %></div>');
<% elsif @success_message.present? %>
location.search += "&coupon_id=<%= @coupon.id %>";
localStorage.setItem('success_message', "<%= @success_message %>");
localStorage.setItem('coupon_code', "<%= @coupon.code %>");
setTimeout(function(){
  localStorage.removeItem('coupon_code');
  localStorage.removeItem('success_message');
}, 300 * 1000);
<% end %>

some tip why setTimeout is not working?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!