You need to sign in to do that
Don't have an account?
Chitra Thambirajan
Not able to open modal dialog in Chrome
Hi All,
In my Visual force page while clicking on a lookup icon, I need to open a popup window to select list of available options
Am using the following line of code to open a popup.
While cliking on a link in Chrome am getting the following error in developer console
Any idea..??
If anyone need more info about the page am ready to give..
Thanks in advance
Chitra
In my Visual force page while clicking on a lookup icon, I need to open a popup window to select list of available options
Am using the following line of code to open a popup.
window.showModalDialog('/apex/CustomCausalityLookup', passvalue, 'dialogHeight:450px; dialogWidth:700px;');it is working as expected in FireFox but in Chrome pop up is not coming.(I have checked the Chrome browser settings and checked Allow popup option ...)
While cliking on a link in Chrome am getting the following error in developer console
Uncaught TypeError: undefined is not a function AddNewCause?retURL=%2Fa05%2Fl%3FretURL%3Dhttps%253A%252F%252Fc.na15.visual.force.com%252Fapex%252FS…:75 openlookup AddNewCause?retURL=%2Fa05%2Fl%3FretURL%3Dhttps%253A%252F%252Fc.na15.visual.force.com%252Fapex%252FS…:75 onclick AddNewCause?retURL=%2Fa05%2Fl%3FretURL%3Dhttps%253A%252F%252Fc.na15.visual.force.com%252Fapex%252FS…:12
Any idea..??
If anyone need more info about the page am ready to give..
Thanks in advance
Chitra
Actually this ModalDialog is deprecated in Chrome 37..So we can not use this method to open a popup.
We need to use window.open method
This did the magic..
To assign values for parent window properties from Child window i have used window.opener
Also we can access the parent window method in child window
Thats it...
Thank you Sumit for your time.
All Answers
My best guess is; you are facing error because VF pages always fall on different domain "visual.force.com" and this might be cross domain referencing issue which work in Firefox but Chrome don't handle it.
Thank you for you reply..
I just had a look on the inspect element in both browser,there is no much difference.
But in Firefox console am not getting any error.
But in Chrome am getting the following errors,
The errors are,
Any idea..
Thanks
Chitra
So it uses latest JS APIs! Secondly, it sounds like this is cross domain issue based on "xdomain.js:4Sfdc.xdomain.IframeInterface.handleOnload iframeinterface.js:1window.onload" there.
Also Check:
1. http://salesforce.stackexchange.com/questions/8806/how-can-i-embed-a-dashboard-in-visualforce
2. http://salesforce.stackexchange.com/questions/42704/old-console-and-visualforce-pages [Disable clickjack protection for non-setup Salesforce pages]
PS: if this answers your question then hit Like and mark it as solution!
I have changed the below reference in all the pages
the error related to integration.js is gone,but still am unable to open the popup.
when i click on the lookup icon am getting the same old error in developer console
Thanks
Chitra
PS: if this answers your question then hit Like and mark it as solution!
Thanks
Chitra
Actually this ModalDialog is deprecated in Chrome 37..So we can not use this method to open a popup.
We need to use window.open method
This did the magic..
To assign values for parent window properties from Child window i have used window.opener
Also we can access the parent window method in child window
Thats it...
Thank you Sumit for your time.