webview

Link to resources inside WebView - iPhone

I have a webview in my iPhone application, and I also have some html files inside my Resources folder. When my app loads, I load in a page from my resources into my webview. But , I need to make links inside my webview that point to some other resources (For example, images, or other html files). Just doing a relative link doesn't work: ...

Take snapshot of view / WebView programmatically

Hello, I want to take a snapshot of a view (WebView) or, if that is not possible, the whole screen, so I can save it into the user's photo gallery. I was wondering if this is possible. Thank you very much, Isaac Waller http://www.isaacwaller.com/ ...

Scrollable div on iPhone without using 2 fingers?

Hi there; I've got a UIWebView embedded in my iPhone app, and I'd like to keep a locked header and footer DIV on the page at all times, with a scrollable center DIV. I know that I could do this using a header/footer that are UIView controls, but I want the header and footer to be HTML divs, as a pure HTML/JS/CSS solution will be easie...

How to pass "stringByEvaluatingJavaScriptFromString" to a webView frame?

[[webView mainFrame] loadHTMLString:html_string baseURL:[NSURL fileURLWithPath:@"/"]]; [[[webView mainFrame] webView] stringByEvaluatingJavaScriptFromString:test]; When I omit the second line which references a location.href = "#id" that so the webView will scroll to the appropriate line, the page loads fine. But when I include it and ...

WebView with a lot of data very sluggish to repaint when resizing

I have a lot of data in a WebView that I am loading... once its loaded navigation is very fast and the application runs great, but when resizing the main window, which resizes the WebView, it is very slow. It takes about 2-3 seconds to resize... is there anything I can do to help this? ...

Android WebView save state?

Hello, In the Browser that comes with Android, when you rotate the phone, the WebView is not reloaded. I was wondering how to do this. I can save the current URL of the webview and pass it to the next version of myself, but how do I with the whole WebView. Thanks, Isaac ...

How can I get current scroll position on UIWebView

Hi I have a UIWebView And how can i get It's scroll position ? I know, that UIWebView has a UIScroller subview. But I can't get offset of this UIScroller ((( ...

Opening links but not iFrames in webview

I have an webView in a Cocoa application which I edit the contents programatically. What I wanted to do was make clicked links open in the users default browser, so I added the code at the bottom of this question. It works perfectly but if there is an iFrame on the page that loads it will open the iFrame contents in the default browser a...

Notification of WebView's selection change

I'm attempting to implement a feature where a user can select some text in a WebView and, after releasing the mouse button, a small window will pop up to allow the user to perform some operations on the selected text. However, I'm running into some trouble with determining when the user's selection has been "confirmed", for lack of a be...

Get text field info out of loaded webpage - Mac OS X Development

Hi, I am a newbie in the Mac world. I need to create an app that is able to extract information entered on a web page, from text fields. My app will load a webpage hosted somewhere, and within the webpage there will be a a series of text fields and a submit button. Once the button is clicked, I must be able to read the information ente...

change innerHTML of cocoa DOMElement

Objective-c, Webview Hello, I'm trying to change the innerHTML of an DOM elemnent in a DOMDocument: DOMDocument *myDOM = [[storyDisplay mainFrame] DOMDocument]; DOMElement *heading = [myDOM getElementById:@"heading"]; [heading setNodeValue:@"hejsa"]; Nothing seems to change when the above lines are executed, is this the right w...

Loading contents in the webview placed on the Scroll View.

hi, I am having 3 UIWebviews on a UIScrollView. I want to get the html pages loaded into the webviews. the problem is that the webview doesn't load the contents unless the scrollview is scrolled and the particular webview is displayed on the screen. Is there any way to load the contents to the web view ,when it is off the screen ? tha...

Android WebView handling orientation changes

Just started working with the webview. The issue is performance following rotation. The WebView has to reload the page, which can be a bit tedious. What's the best of of handling an orientation change without reloading the page from source each time? ...

Cocoa WebKit - detecting CSS rollover/hover

I have a WebView displaying a HTML page, linking to a CSS file. The CSS file makes use of the pseudoclasses :active and :hover for rollover effects. Q. How can I tell, in my WebView, when :active and :hover have been called? I would like to intercept these calls and act on them programmatically within Cocoa. Thanks. ...

Can you write Cocoa apps with HTML/CSS and Javascript?

I was thinking, would it be feasible to create a Cocoa app that is essentially just a an interface with a web view? Or is there some serious limitation when doing something like this? If it is "feasible", would that also mean that you could do the same for Windows applications? ...

How do I save/display line breaks properly in a UIWebView for the iPhone?

I have a UIWebView-based iPhone application that reads in HTML from a SQLite database. The user can save new information, entered via a UITextView that accepts carriage returns. How do I display these carriage returns (line breaks) properly in the UIWebView? I have tried using something like this: NSString *HTMLData = [mySQLiteDataObjec...

Getting document position in a WebView?

To put it simple: I want to bookmark the current position (probably several positions) in a html file displayed in a WebView to later restore it. Any little hint would help. :) ...

How can I retrieve the HTML to be loaded into a WebView (or WebFrame) from a local persistent store?

So, I have a bunch of HTML is being stored in a SQLite database, and they link back and forth amongst themselves. When a user clicks to follow a link, that request needs to be serviced by pulling the appropriate HTML out of the database. This could result in needing to load images, which are also being stored in the database (this is a f...

loading DOMDocument in Frame/webView

since there was no to this question http://stackoverflow.com/questions/1209586/iphone-tabbed-browsing-by-storing-webview-in-an-array-plist yet, I wanna try to get the DOMDocument (the whole content of the webView (with JS and pictures), not only the html document) using the private WebKit framework for iPhone. My question is: How do I s...

Cocoa webView - Disable all interaction

I have a webView in my cocoa application (macosx not iphone), it displays some javascript to the user but I don't want the user to be able to select any of the text or right click and select the reload option. Is there a simple way to disable all interaction with the webView? I know on the iPhone its easy to disable user interaction bu...