Chcialbym aby po nacisnieciu guzika wyswietlic sobie adres strony z ramki ale wyswietla mi biezacy adres, probowalem rowniez to uzyskac przy uzyciu czegos takiego
<html> <script type="text/javascript" lang="Javascript"> function getFrameUrl() { var iframe = document.getElementById('moja_ramka'); var url = iframe.contentWindow. location.href; alert(url); var adresInput = document.getElementById('adres_input'); adresInput.value = url; } </script> <body> <div style="height: 200px; border-bottom: 2px solid black;"> <form name="moj_formularz" method="GET"> <input id="adres_input" name="adres" type="textfield" /> <input type="button" value="Dodaj" onclick="getFrameUrl()" /> </form> </div> <div> <iframe width="100%" height="100%" id="moja_ramka" src="http://onet.pl" /> </div> </body> </html>
ale rowniez bez skutku ... juz nie mam pomyslow jak to zrobic, moze ktos ma jakis pomysl ? Z gory bede wdzieczny, pozdrawiam.