views:

38

answers:

2

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

A: 

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.

David Hedlund
david,i am using the salesforce api components to render controls on the page...the controls inherently are rendering an iframe in html...i already tried to set the target to the parent but that did not work either..
kd
`overload:auto`?
Josh Stodola
:D slip of the tongue, er, keyboard... fingers? whatever. `overflow: auto` of course
David Hedlund
+1  A: 

Try this...

top.location.href = 'http://www.google.com';
Josh Stodola
nevermind the previous comment...it worked ...thanks josh
kd