function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sukhdeep Singh 1Sukhdeep Singh 1 

Any alternate option of iframe that I can use here ?

Hi,
 
I have a custom link on a standard page to open a popup(VF page).
But Its not working on mobile devices. Please tell me any alternative of iframe that I can use here
My current custom link code is below.
 
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')}
{!REQUIRESCRIPT('/js/functions.js')}
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/jquery-1.8.2.min.js')}
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/ui/jquery-ui-1.9.1.custom.min.js')}
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/postmessage/jquery.ba-postmessage.js')}
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/bbq/jquery.ba-bbq.min.js')}
{!REQUIRESCRIPT("/support/console/26.0/integration.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}
requireCssFile('/resource/jQueryForPopup/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css');
 
function requireCssFile(filename)
{
var fileref = document.createElement('link');
fileref.setAttribute('rel', 'stylesheet');
fileref.setAttribute('type', 'text/css');
fileref.setAttribute('href', filename);
document.getElementsByTagName('head')[0].appendChild(fileref);
}
var j$ = jQuery.noConflict();
var parent_domain = window.location.protocol + '//' + window.location.host;
var iframe_url;
if (sforce.console.isInConsole())
iframe_url = '{!URLFOR("https://cs1.salesforce.com/apex/PAInlineVF")}'+'isdtp=vw&id='+'{!Service_Request__c.Id}'+'&parent_domain='+parent_domain;
else
iframe_url = '{!URLFOR("https://cs1.salesforce.com/apex/PAInlineVF")}'+'?id='+'{!Service_Request__c.Id}'+'&parent_domain='+parent_domain;
var child_domain = iframe_url.substring(0, iframe_url.indexOf('/', 9));
var j$modalDialog = j$('<div id="opppopup"></div>')
.html('<iframe id="iframeContentId" src="' + iframe_url + '" frameborder="0" height="100%" width="100%" marginheight="0" marginwidth="0" scrolling="no" />')
.dialog({
autoOpen: true,
title: 'Address Search Tool',
resizable: true,
width: 600,
height: 250,
autoResize: true,
modal: true,
draggable: true
});
 
j$modalDialog.dialog('open');