Good afternoon!
I am creating a mobile application. I have index.html "screen A", which onSubmit calls the javascript function:
$.get(myRemoteURL, function(data) {
document.open();
document.write(data);
document.close();
}, "text");
which then overwrites the page with the new “screen B” content obtained by creating the webservice RQ. This content is jquery mobile content that I programmatically create in my Java tags with all the "divs" and "page" elements needed for mobile viewing.
Then I create another RQ web service and repeat the same call to the javascript function again to replace the “screen C” mobile content with the new jQuery with the new data received from this RQ web service.
Problem: I can’t find a way to correctly make the back button from “screen C” to “screen B”. It’s as if I can return from “screen B” to “screen A” using window.history.go (-2) (window.history.length said 7, but why exactly -2 works to go back to index.html I have not).
The big problem is that I cannot return from "screen C" to "screen B". I am trying to get the HTML content that I replaced from the content that I replaced. I tried using JSON localStorage to store the contents of “screen B” in a variable so that I could replace the contents of “screen C” with the stored contents of “screen B”, but that did not work. I also got an error message
"Exception in thread "http-bio-8080-exec-402" java.lang.OutOfMemoryError: PermGen space"
" B" JSON - , - RQ , 1-2 .
, - "", " C" " B"? ? " " ?
:
. " " . " B" ant, " B" , - RQ " C". , " ", , index.html " B" , , GET, ( jquery- " B" ) webservice RQ " C" . " B" :
<a href="" onClick="switchToScreenC(_hidden_id_value, urlForScreenC)">Select</a>
_hidden_id_value , , , webservice RQ " C" .
javascript:
urlForScreenC = urlForScreenC + "?parameter=" + $("#" + _hidden_id_value).val();
$.get(urlForScreenC, function(data) {
document.open();
document.write(data);
document.close();
}, "text");
.
.