I'm not too experienced with JavaScript and I need this code modified. <script language="JavaScript" type="text/javascript"> <!-- function breakout_of_frame() { // see http://www.thesitewizard.com/archive/framebreak.shtml // for an explanation of this script and how to use it on your // own website if (top.location != location) { top.location.href = document.location.href ; } } --> </script> Code (markup): I want it in a way such that "if (top.location != location)" changes to "if (top.location != myurl.com)". I've spent quite some time trying to figure it out and attach variables to it etc., but it just doesn't work as I am still a n00b to JS. Can somebody help me? - Karan
If I understood you, is this: <script language="JavaScript" type="text/javascript"> <!-- function breakout_of_frame() { // see http://www.thesitewizard.com/archive/framebreak.shtml // for an explanation of this script and how to use it on your // own website if (top.location != "myweb.com") { top.location.href = document.location.href ; } } --> </script> Code (markup):