1

I have some JavaScript code that returns the current visited page's url. This code runs as a href link. I would like to make it do the same when I open it using a Chrome extension that opens a page in an iframe (can be different domain). The iframe opens fine but the url does not populate. I have tried window.parent.location types to no avail.

javascript:void(window.open('http://www.example.com/..?s=%20'
    +encodeURIComponent(document.title)+'%20'
    +encodeURIComponent(location.href)+'%20'
    +encodeURIComponent(window.getSelection())))
serv-inc
  • 35,772
  • 9
  • 166
  • 188
Jeff
  • 551
  • 1
  • 5
  • 19

0 Answers0