Reputation: 17288
I have a web application (A) which contains an iframe
. The iframe
includes another web application (B).
Supposed I log into web application A and 5 different iframes are displayed hosting 5 different modules. One of those modules is a CRM application that requires user login. How can I pass the credentials of the logged on user in web application A to this CRM module (web application B) that is hosted in an iframe
?
Upvotes: 5
Views: 3617
Reputation: 1504
A preferable method is to use JQuery
.
There is post messaging concept, in that and i have used this in several projects. If you are not aware of it, then click this link.
If you surf in internet, you can found many posts related to it.
For your feasibility, i have placed below link which will be useful to you:
EX:
pm({
target: window.frames["example2"],
type:"message2",
data:{hello:"world"},
success: function(data) {
$("#example2").after(JSON.stringify(data));
}
});
pm.bind("message2", function(data) {
$(document.body).append(JSON.stringify(data));
return {foo:"bar"};
});
Let me know if this is not helping you.
Upvotes: 3
Reputation: 23300
Assuming it's Dynamics CRM we're talking about, you can retrieve user information via a simple WhoAmIRequest
, which will retrieve the current user information (based on the systemuser
entity). You already login into the CRM anyway, so it shouldn't be much different from what you already did (or I assume you did)
I think the SDK has a sample doing exactly that, you might want to look it up.
Upvotes: -1