Why Is Javascript:history.go(-1); Not Working On Mobile Devices?
First, some background: I have an application which presents a search page (html form) to the user. Once criteria have been filled out and the Search button is clicked, results app
Solution 1:
Use:
<a href="javascript:history.go(-1)">Back to Results</a>
ie not in "onclick
" but in "href
" - that's work
Solution 2:
For Android, you need to enable javascript in the webview :
webView.getSettings().setJavaScriptEnabled(true);
Solution 3:
What method are you using to pass filters to your search page? POST or GET?
If you're using a POST then you would have to resubmit your filters when they go back, otherwise your page won't have anything to filter on.
Try switching to a GET and see if that works.
I think the important distinction is that it is working (i.e. sending you back a page), but your mobile device isn't reposting your form fields?
Post a Comment for "Why Is Javascript:history.go(-1); Not Working On Mobile Devices?"