Is There Any Way We Can Get Url Of PopUp Windows In Parent Window August 25, 2022 Post a Comment I want to Get a url of popUp window And Show It in Parent window. Solution 1: If the popup is from a third party domain (such as google.com), then you can't access the location.href property of the popup because of the "same origin policy". If it's in the same domain, then you can get the URL by doing this on the parent window: popUpWindow.location.href Copy Solution 2: You can call a function onclick and have the url there as a variable:Baca JugaHow To Download File In Browser Using Spring Mvc?How To Put React Component Inside Html String?Validate And Filter Email Address With Regex? <a href="#" onclick="my_function()">Click Here</a> Copy And then you can do anything you want with the url: function my_function() { var url = 'http://www.google.com'; window.open(url ,'MyWindow',width=600,height=300); //show the url in an element return false; } Copy Share You may like these postsLoad Html Contents Of A Given Url And Place Exactly There (like Document.write()) In JavaScriptOpen A New Tab With Javascript But Stay On Current Tab Using JavascriptInput Type Text And OnKeyDown Not Working Under IEPrefilling Large Volumes Of Body Text In GMAIL Compose Getting A Request URI Too Long Error Post a Comment for "Is There Any Way We Can Get Url Of PopUp Windows In Parent Window"
Post a Comment for "Is There Any Way We Can Get Url Of PopUp Windows In Parent Window"