QuepasaTio QuepasaTio - 1 year ago 60
HTML Question

HTML Link not breaking out of the frame into a new tab / Possible?

I am dynamically creating a link using jquery's append...Here's the code

tr.append('<td>' + obj.title + '<a href="http://somesite.com"><i class="fa fa-external-link wb" target="_top"></i></a></td>');

This code sites in an iframed page, so when I click on this link I need it to break out of the frame...hopefully into a new tab (if possible).

My problem is that it's not linking at all and not breaking out of the frame.

How can I get this to work?

Answer Source

Try the following and see if it works:

tr.append('<td>' + obj.title + '<a href="http://somesite.com" target="_blank"><i class="fa fa-external-link wb" target="_top">Test</i></a></td>');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download