Reputation: 165
I have a scenario where Im opening a modal window dailog from Page1.aspx. Now after opening the modal window dialog If a user copies a URL and tries to open that window dialog directly from the browser. The modal window dialog shouldn't open directly. It should open ONLY from Page1.aspx. How do I check if user has not opened it directly in the browser. Basically Im looking for a substitute of URLReferrer in javascript.
Any help would be appreciated.
Thanks & regards,
Sumit Arora
Upvotes: 0
Views: 4602
Reputation: 2402
Kindly to using this line of script
if(window.opener)
{
var locationOfParentWin = window.opener.location.href;
}
Regards
Upvotes: 1