In the jQuery file itself:
this.item_test = function(){
$('body').css('background-color', '#00ff00');
window.location = "/allCorrect/yes";
}
Out come 1 (for line 1 proves jQuery is working): The background of the UIWebView colors green (expected & correct).
Out come 2 (for line 2, the window.location line): In the (UIWebView *)webView shouldStartLoadWithRequest: delegate method, the expected value for request.mainDocumentURL.relativePath is /allCorrect/yes.
My Problem:
Instead of getting “/allCorrect/yes”, I get the below file location of the calling jQuery file itself:
“/Users/chiemekailo/Library/Application Support/iPhone Simulator/5.0/Applications/77BB3C4A-E99C-47C3-B2AE-F4DSDMFE84MFOEF/Documents/Unzipped/OPS”
This will work without using jQuery so I can’t imagine why or how jQuery makes a difference, but instead of using a location change you could try this method instead which (without jQuery) will also trigger webViewShouldStartLoadWithRequest to see if it works with jQuery.