+ 25

Is it possible to embed iframe within material icon ?

I wanted to embed the webpage such that when I click the material icon, the webpage shows up.But this is what's showing up 😖😩 Help plz ... https://code.sololearn.com/WlEcmQd8695J/?ref=app

20th Jul 2020, 8:18 AM
Justin
Justin - avatar
40 Answers
+ 9
🔰 Justin 🔰 you can't embed an iframe inside material icons because the text inside defines what icon is to be used. You can try like this 👇 https://code.sololearn.com/WlLh097GakC6/?ref=app if you click on the icon the web page will be displayed in the iframe. Note: not all websites are allowed to be embeded in an iframe
20th Jul 2020, 10:41 AM
viknesh vikky
viknesh vikky - avatar
14th Aug 2020, 5:42 AM
Prachi The Pari ⭐
Prachi The Pari ⭐ - avatar
+ 6
Thank u and I'll complete it soon 😉
20th Jul 2020, 12:19 PM
Justin
Justin - avatar
+ 5
Some webpages cant be embedded as iframes. Have you tried different webpages to test this?
20th Jul 2020, 8:21 AM
Dragonxiv
Dragonxiv - avatar
+ 5
check this. I think that's what you are trying to do https://code.sololearn.com/WlLh097GakC6/?ref=app
20th Jul 2020, 12:09 PM
viknesh vikky
viknesh vikky - avatar
+ 4
Dragonxiv And how to embed it in the material icon . I placed it in btwn the icon tag but the icon disappeared 😵😱
20th Jul 2020, 8:29 AM
Justin
Justin - avatar
+ 4
꧁༒Rishabh༒꧂ who knows. At times people find it fun to do such things.
20th Jul 2020, 6:14 PM
Prabhakar Dev
Prabhakar Dev - avatar
+ 4
🔰 Justin 🔰 An international group came here just to downvote us. We must be quite important people.
20th Jul 2020, 6:17 PM
Prabhakar Dev
Prabhakar Dev - avatar
+ 3
You cant embed this one in a iframe due to cross-origin policy. This policy forbids any other site to use the host(here w3cschools.com) site's icons, images, etc. Let me look for a solution
20th Jul 2020, 8:54 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 3
🔰 Justin 🔰 check the below code. I have edited it so that when you click on the launch icon the material icons web page will be displayed in the iframe. https://code.sololearn.com/WlLh097GakC6/?ref=app
20th Jul 2020, 10:53 AM
viknesh vikky
viknesh vikky - avatar
+ 3
viknesh vikky Can only see the webpage but I want the material icon to be displayed and when I click the webpage should open. But it's not 😢
20th Jul 2020, 11:02 AM
Justin
Justin - avatar
+ 3
🔰 Justin 🔰 you want the material icon to be inside the iframe and then when you click on it, the web page should load. Is that what you are trying to do?
20th Jul 2020, 11:23 AM
viknesh vikky
viknesh vikky - avatar
+ 3
viknesh vikky you did it. Thats exactly what he wanted
20th Jul 2020, 12:10 PM
Prabhakar Dev
Prabhakar Dev - avatar
+ 3
Lord Dev Thanks🤗
20th Jul 2020, 12:11 PM
viknesh vikky
viknesh vikky - avatar
+ 3
Thank u !! But how did u do that ?
20th Jul 2020, 12:13 PM
Justin
Justin - avatar
+ 3
🔰 Justin 🔰 Just hide the iframe initially then show it when an app icon is clicked. since the icon is inside the <a> tag which targets the iframe to open the link, the website will be loaded automatically. when you press home or back button hide the iframe. That simple 😄. Good luck 👍 for you Android phone. Hope we see that working soon 😅
20th Jul 2020, 12:16 PM
viknesh vikky
viknesh vikky - avatar
+ 3
I really don't know who's downvoting this question viknesh vikky
20th Jul 2020, 3:19 PM
Justin
Justin - avatar
+ 3
🔰 Justin 🔰 No problem. May be they don't understand the question well 😅.
20th Jul 2020, 3:21 PM
viknesh vikky
viknesh vikky - avatar
+ 3
Yes 😅😆
20th Jul 2020, 3:24 PM
Justin
Justin - avatar
+ 3
viknesh vikky I don't know why the heck do people do this
20th Jul 2020, 3:25 PM
Prabhakar Dev
Prabhakar Dev - avatar