-2

I created a web browser type application using a textbox as an address bar and an iframe as a web content host. Upon entering an address in the textbox, the content in the iframe changes and is working properly. When the client clicks on a link in the iframe, the text in the address bar should change according to the content in the iframe - how can I do this?

For example: To begin with, www.microsoft.com is in the textbox and the corresponding page is in the iframe. If I click on a link such as products, the text box text should change to the page in the iframe.

Nathan Kuchta
  • 13,482
  • 2
  • 26
  • 35
  • you are telling that already the question having three answers,,,but one also not suits for my answer. this is not answer i am looking for ,i am looking to get status for iframe and to get that status to my addressbar..... document.getElementById("iframe_id").contentWindow.location.href – Rajasekharreddy Kadasani Nov 01 '13 at 07:34

1 Answers1

0

You can use the onload event on your iframe to know when url has been changed. Then read the src attribute and update your textbox.

Sebastien C.
  • 4,649
  • 1
  • 21
  • 32