i have created a page which has an iframe held on it i now what to post the data from this iframe and make it available to my other php page. I have researched this a bit and found out it can be done using javascript. the code i have found is this.
<script type="text/javascript">
document.getElementsByName('rand')[0].value = document.getElementsByName('main')[0].src;
</script>
i am not to up on javascript so a little help is needed with this. i know the first element is the name of the hidden input i want to post, were i loose understanding is the next element name. is this the name of the page that the information needs to be posted to or is this how it posts it to the page the iframe is held on (main being the name used for that).