Here is what i got:
1=page containing a form
2=page containing an iframe of 1
I created an invisible textarea in a form, so it could be filled with URL of page that cointains an iframe.
Both 1 and 2 are on different domains. I got full access to both sites.
What im trying to do is to know where from was the form sent.
Not sure if im clear enough:

I already tried to append:
<script type="text/javascript">
$(document).ready(function() {
$('textarea#id_subject').append(window.parent.location.href)
});
</script>
to 1, but it didnt work. How could i achieve this, any idea?
BTW, this iframe is going to be attached to 10-100 other sites.
You can add url of parent window as GET parameter in iframe url:
It can be done both on server side or on client side. From inside of iframe you can access this value on server side (by reading GET parameter), or on client side (by reading
location.href).