Forum Moderators: open
<script language="javascript" type="text/javascript">
<!--
if (top.location == self.location) { //if page is not in its frameset
top.location.href = "http://www.example.com/page.htm" + "?" + window.location.href;
}
//-->
</script>
_____________________________________ABOVE GOES IN CHILD ORPHAN
<script language="javascript" type="text/javascript">
<!--
pageURL = "www.example.com/Resource-4023/page.htm";
if (parent.document.URL) {
parentURL = parent.document.URL;
if (parentURL.indexOf('?')!= -1) {
pageURL = parentURL.substring(parentURL.indexOf('?')+1,parentURL.length);
}
}
function fillFrame() {
parent.main.location.href = pageURL;
}
//-->
</SCRIPT>
________________________ABOVE GOES IN FRAMESET HEAD
------------------
Anyone have a clue?
[edited by: tedster at 8:00 am (utc) on Jan. 15, 2004]
[edit reason] use example.com [/edit]
Google does not execute javascript, but they do look for text strings that look like a URL and therefore you might end up with some craziness using your exact approach.
Here's the code I use successfully, in our Generic Javascript [webmasterworld.com] thread, Message #21