Amir
Amir

Reputation: 41

Get iframe current url

As I saw this question is like duplicate but I have to ask you guys because I couldn't find any clear answer.

Let me explain my project,

I have an online store project that in this store we have two kind of products,

First group is our product that we added them to our website but the second group are products from other companies that they are our partnerships,

We want to show their website in our store as an Iframe or Popup,

Our customers searching that they needs on iframe and when they click on a button in our website we get the current iframe or popup current url and save it in our database.

I saw the solutions only works in the same domain but My domains are different,

I want to ask is it possible if not what you recommend me to do?

Upvotes: 0

Views: 94

Answers (1)

Amir
Amir

Reputation: 41

As I understood you can't get the Iframe current url because of security reasons, But I create href tag like popup and ask my customers to copy the link of popup and save it in my database like bellow,

<a href="@item.Link" class="text-default" onclick="window.open('@item.Link', 'newwindow', 'width=1000, height=1000'); return false;">Link</a>

Upvotes: 1

Related Questions