ios - JavaScript popup window on ipad -


i have not been able open popup windows on ipad using javascript window.open function, why have been trying make alternative solution ipad's, inspired this thread.

 function newpopup(url) {      // user agent string     var deviceagent = navigator.useragent;     // set var ios device name or null     var ios = deviceagent.tolowercase().match(/(iphone|ipod|ipad)/);       if (ios) {         // line matters         $(this).attr('href', url);     }else{              popupwindow = window.open(             url,'popupwindow','height=250,width=350,left=50,top=50,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=no')     } } 

still can't open new window on ipad. there way target ipad?

yes can find here

if( navigator.platform === 'ipad' ){     alert('hurray'); } 

more details read here: https://developer.mozilla.org/en-us/docs/web/api/navigatorid.platform

also detects iphone if needed , other platforms.

if( navigator.platform === 'iphone' ){     alert('hurray'); } 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -