kd.
kd.

Reputation: 292

iframe problems

I have a page that has an embedded iframe doing ajax requests.... when i click on a link i want the new link to open up in the main window and not the iframe which it is doing right now... i tried doing this in javascript

window.parent.location.href = url of link

doesnt work... anyone out there with a better idea to do this???

also i need popups to appear onhover over the links...right now they get clipped by the main page....

thanks

Upvotes: 1

Views: 476

Answers (2)

David Hedlund
David Hedlund

Reputation: 129792

Try setting target="_parent" to the anchors.

But judging from your requirements, I'm suspecting an iframe is not the ideal solution for you at all. You might want to consider switching do a div with fixed width and height and an overflow: auto style.

Upvotes: 1

Josh Stodola
Josh Stodola

Reputation: 82483

Try this...

top.location.href = 'http://www.google.com';

Upvotes: 1

Related Questions