I have a web app that I'm writing for the iPhone which searches a DVD database and displays results. Each result has a link to the movie's IMDb (Internet Movie Database) page. The web app is designed to be added to -and launched from- the iPhone's Home Screen which means the Safari back and forward buttons are not displayed. This has resulted in an unforeseen problem - if the user activates the IMDb link they will go the the IMDb page but then there is no way to go back to the web app's results page they just left.
I have a problem though - after an IMDb page has loaded, when some links are pressed instead of opening in the web app, Safari starts automatically and the link loads in that, this is really annoying because now the user can not return to the results page, the web app is closed and when finished with the IMDb page(s) the user has to start the web app again and re-enter the search details. The back and forward links in my top bar work fine but the 'home link' (which just loads my results php page) always opens in a new Safari window [Note. my top bar's home link does not use TARGET="_blank", I tried using TARGET = "_self" but the home link still opened in a new Safari window.]
<div id="homelink"><a href="res.php"><img src="Icons/arrow_home.png"/></a></div>
<object data="http://m.imdb.com/title/tt1375666/" width=100% height=100000>
<embed src="http://m.imdb.com/title/tt1375666/" width=100% height=100000></embed></object>
Strangely this only happens with some links on IMDb and not all (these are just normal page links not video trailer ones). Also if I open the web app's URL in Safari, do a search, and activate an IMDb link, there is no problem with links opening in a new window/tab, that does not happen ever.
Is there any way to stop the links opening Safari?