Search code examples
iframehiddentarget

Hiding iframe target having different page


I am trying to show an alert on another page while looking like the same page.

<a href="<?php echo pageShowingAlert ?>" target="targetFrame"><b><?php echo Click ?>. </b></a>
<iframe name="targetFrame" width="0" height="0" style="visibility:hidden;"></iframe>

So, when it's clicked, the page(pageShowingAlert) will be shown on the iframe(targetFrame) but it's not cuz I hided and sizes are 0. I checked this works on a test page. not turning to another page but alert only.

However, this code is included in an automatic email sending source. And it doesn't work. I input some size "width="300px" height="300px"" without "hidden" and it turns to another page(pageShowingAlert). Even in the email, "target="targetFrame"" is shown as target="_blank", the previous source. I am confused what I am missing.

Can someone give me some comments for that?


Solution

  • I am new for HTML and web program, and didn't know the difference btw web HTML and Email HTML. Many sites including this site(https://kb.mailchimp.com/campaigns/design/limitations-of-html-email) said interactive elements like Flash, JavaScript, or HTML forms are not working in most email inboxes.

    Anyway, I know one thing from the experience though, hope I won't waste my time for nothing!