/ Published in: Objective C

There is no native Cocoa way to do this, and this method was not advertised on the net much.
This is the only way to jump to a named anchor programatically.
This is the only way to jump to a named anchor programatically.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// http://lists.apple.com/archives/Webcore-dev/2003/Jul/msg00004.html [oWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"var anchor = document.anchors[\"%@\"];window.scrollTo(anchor.offsetLeft, anchor.offsetTop);", anchor]]; }
URL: http://mabblog.com/
Comments
