views:

178

answers:

2

how do i call a link to itunes (itms://...) without opening a new window. with window.open there comes a new window (as the function says :)) $.get('itms://...'); doesn't work.

Any other possibilitys :)?

would be thankful for help!

+1  A: 

Didn't try, but two ideas come to mind:

  1. iframe
  2. set location to the URL, it shouldn't replace your page anyway.
Nickolay
A: 

To clarify, you are referring to not opening a new browser window, as opposed to trying to open iTunes within the browser.

In that case, Nickolay's 2nd option is your best bet - this JavaScript will work (using actual example URL):

var url = 'itms://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307538288';
location.href = url;
michael