how to submit a form if the iphone is locked using jquery/javascript -


i have web page developed using jquery mobile , html5, takes answer user , submit form server. working fine in desktop have issues when run in iphone. when iphone locked javascript never runs in background ios stops js when page not in focus or when phone locked performance boosting. page not submitted until user submits manually.but want submit form if user not active or if locks phone.

is there way detect when iphone's lock button pressed in jquery mobile ?

i have googled enough not find answer though exists similar kind of posts.

any appreciated.

thanks in advance!

have tried catch blur event on window?

window.addeventlistener('blur', function() {     console.log('locked'); }); 

also try

document.addeventlistener('webkitvisibilitychange', function() {     console.log('locked'); }); 

p.s. not sure work


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -