views:

47

answers:

1

I have noticed that the app "Reeder" is using the UIWebView but ignores this event. it displays a custom view instead of the original UIActionSheet view.

A: 

found a solution myself:

avoid using any html tag <a></a>, instead use javascript onClick to handle click event.

here is an example :


<script type="text/javascript">
window.plaction = function(url) {
    window.location.href = url;
    // window.location = url;
};
</script>

<p> onclick="plaction('title:a::url:http://localhost:3000/toplists/2.xml')" class="name">contents<p>

xhan
So this only works on html that you load from within your app that you've written to use onClick events, right? Without using some hacky javascript rewrites, you couldn't use this solution on normal webpages.
Jasarien
right, most time it should work for your own app and own web pages. but for some app like rss reader, there must be some other ways to solve it.
xhan