Skip to main content

K2 smartforms control to parse URL querystring data for the local window and parent windows. This control is very useful when hosting smartforms in an iframe in another application, such as SharePoint, where you need to have access to the querystring parameters in the parent window. For instance, you can use this control to host K2 smartforms task pages within SharePoint.

Hi 

I am using the URL control in one of my project and I am getting the parent URL from a form embedded in an iframe in SharePoint.

 

It works well, but sometimes I get the identity url instead of the parent Url where the iframe is contained.

https://xxxxxxxxx/Identity/sts/Windows/wsfed?wa=wsignin1.0&wtrealm

 

After some troubleshooting I noticed that this only happens with new users that access the form, since K2 redirects the users for logging and when it returns to load the form, the URI control sees the parent url as the identity URl instead of the actual parent SharePoint site.

 

So after looking of the code I noticed th following line.

 

if (isInIframe) {
parentRawUrl = document.referrer;

 

So in my case the referrer will be the identity link, hence I am receiveing the incorrect parent URl.

 

 

 

 


Reply