Links will not open from within a UIWebView - xcode

I'm loading a local HTML file into a UIWebView when my application starts. The file contains links (absolute URLs) to external sites. The local file loads in the UIWebView in the iPad simulator without any issues. However, when I click on any of the external links, the pages won't load. I only see the progress indicator.
These same absolute URLs will open when used with a call to [webview loadRequest...] when the application starts. And all links on those pages open properly in the UIWebView as well. For example, I can start with http://www.google.com, perform a search, and go to any of the pages in the results.
So a couple of questions:
Why this difference in behavior between links on an HTML page loaded locally and one loaded from an external web site?
How do I get the UIWebView to open links to external sites that are on an HTML page that was initially loaded locally?
Thanks

Related

How to restrict firefox browser to load media files?

I am using Firefox browser and my internet speed is not so good and i use to open so many tabs in the same browser and It takes too much time to load the page due to the media file (Images, videos and audios). Now i want the browser do not load these media files to browse faster.
IS THAT POSSIBLE TO RESTRICT THE BROWSER ????
another method can be used.. use extension
"picture blocker"
The popular "picture Blocker" extension adds a toggle button to Firefox for example that switches the image loading state each time you activate it.

How to save screen shot of a web page?

I want to save screen shot of a web page.But I don't know how.Just like the app delish.In delish ,when i add a bookmark ,the app capture the website and save it such as p5.delish.I guess the screenshot comes from the file of the ".delish".How can i produce this file? or some one has some samples like this app? Thanke you very much!
This might help you: http://allseeing-i.com/ASIWebThumbnail/
ASIWebThumbnail is:
A command line tool for generating thumbnails from web pages
An API to use an embedded version of the tool in your Cocoa applications
ASIWebThumbnail uses the WebKit framework built-in Mac OS X to render web pages. As such, it should support any content that WebKit supports, including HTML/XML + CSS, SVG, content rendered by Javascript (Canvas, AJAX, DOM etc), Java, as well as Flash and other plugins.

how to crawl web page with ajax elements

I want to crawl some web pages, like the following
http://www.youtube.com/user/koglin66/feed?filter=2
but there is a 'load more' button, it is related to an ajax request
http://www.youtube.com/channel_ajax?action_load_more_feed_items=1&activity_view=1&paging=1352148528&channel_id=UCCw8aVnsIeu9S6OPQyaQ14g
I want to crawl the whole page.
Manually, I have click on the button repeatedly until there is no more to load,
by automation, how can I crawl the whole page? thanks!
Yes, you can use Selenium IDE, or use other program/library with browser core to do click action. Like webkit, activex of IE.
And you can try FMiner http://www.fminer.com/, it can record and play human actions on browser to scrape data, but it's not free.
I recently faced same problem with other website I wanted to scrap. I use Java and after some research on the web I used Selenium IDE for firefox in which u can write Java Junit test cases which will automatically open the webpage and click buttons, fill up forms, etc.
It also supports C#,Python,Ruby,etc
I used it to click on Load More button and when the page was loaded completely after all clicks I saved it Manually.
You can download Selenium from their website and I found this youtube video useful too http://www.youtube.com/watch?v=twdDfDOrHC4

opening swf files using WebKit framework

Can any one tell how can i open an swf file using WebKit framework. Please specify the link which specify instructions to do the same.
You can't open an SWF with WebKit.
If the Flash plug-in is installed on the system, a SWF file can be loaded by the Flash plug-in if an HTML page which contains the appropriate embed tags is loaded into a WebView. If all you want to do is display Flash content, you should construct an HTML page that contains the appropriate HTML tags and load it into your WebView.
Note that because the Flash plug-in is not garbage-collection supported, the plug-in won't work if your application uses garbage collection.
If you actually need to open and manipulate the contents of an SWF file you'll need to do it yourself.
If you want to play Flash content without a WebView you can use the commercial FlashInApp framework, but again it won't work with garbage collection.

How do I implement a web linked button that will open inside of my iphone application (not open a link in Safari?

I have an iphone sdk application and want to tweak it.. as I've had a great idea on how I want my interface to appear.
I'm trying to create several buttons that will open a web page within my application but have failed to do so countless amounts of times now.
(I don't want the button to open a link in safari, I already know how to do this and it's not what I'm trying to achieve)
The application must not shut down in order to operate any links (i.e close down to open the link in safari as stated above.)
MORE INFO-----------------------------------
i already have the application and yes it is working and complete, however a while ago i decided that id like to change the interface on my application, but havnt been successful in doing so.
Currently i am using a webView based app which works perfectly, i have my website and another within the application (using a tab bar with two tabs within it).
Now i would like to completely re-model my app by starting from scratch..
using a uiwebview i want to place several buttons on the uiwebview page and have them as links which will direct my members to different sections of my website when pressed..
I have managed to do this but when the buttons are pressed, my application is closed and the link is then opened in safari, which is not what i want.
I would like the links to open within my application
Any ideas?

Resources