Xcode 3.2.6 with ios 4.3 is still available on apple's site (http://developer.apple.com/devcenter/ios/index.action#downloads)
I think they will abandon it with the arrival of version 4 ... fortunately not, if you say that version 4 is buggy.
Eric
sunny wrote:you can use javascript's history object for that as a workaround, but I can easily add methods to NKWebView directly, make requests for each function separately and I'll implement
blazeman wrote:sunny wrote:you can use javascript's history object for that as a workaround, but I can easily add methods to NKWebView directly, make requests for each function separately and I'll implement
Tried this workaround... am I doing it wrong? Button in NKToolbar pointing to the function
function back() {
history.back();
}
Did I do it wrong?
<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = yes" />
</head>
<body>
<script type="text/javascript" src="NKit.js"></script>
<script>
var toolbar = new NKToolBar();
toolbar.init(0);
toolbar.addDoneButton("Done", "closeit()");
toolbar.addButton("Back","" , "back()")
toolbar.addFlexibleSpace();
toolbar.setStyle("black");
var webView = new NKWebView
function openit(a) {
toolbar.show();
webView.init(0,44,330,380);
webView.loadURL(a);
webView.setScalesToFit("yes");
webView.show();
}
function back() {
history.back();
// NKAlert("Popup","back"); used to make sure button work... alert was fine
}
function closeit() {
toolbar.hide();
//and then to hide (not TO DESTROY for NOW)
webView.hide();
}
</script>
<a href="javascript:openit('http://www.google.com')">Open WebView</a><BR>
</body>
</html>
blazeman wrote:Here's the entire page... nothing complex... just playing...
HughJohnson wrote:blazeman wrote:Here's the entire page... nothing complex... just playing...
I think you would need to move your history.back(); to be in the html that is inside the webview. Unless there is an NKExecuteJavascriptOnWebView() function or something that I'm missing.
<script>
var webView = new NKWebView;
webView.init(0,150,300,300);
webView.loadURL("http://nimblekit.com");
webView.setScalesToFit("yes");
webView.show();
function goBack()
{
webView.loadHTML("<script>history.go(-1)<\/script>", "");
}
</script>
<a href="#" onClick="goBack()">Go Back</a><br>
Users browsing this forum: No registered users and 1 guest