Didier Posted May 28, 2018 Posted May 28, 2018 Hi, Is there a way to get the current URL the UniURLframe is displaying?For example the starting URL is google.com. After that the user may navigate anywhere. When the client click on a unibuttonI need to know the current url. Thank you Quote
Sherzod Posted May 28, 2018 Posted May 28, 2018 Hi, Can you make a simple testcase with "the starting URL is google.com" ?! Quote
Didier Posted May 28, 2018 Author Posted May 28, 2018 i just take in your demo : urlframe. i've change to go at start to 'http://free.fr'(a french web site). Now i want to, when you clic a link, after loading the new page, know the url of this page. I tried function frameload(sender, frame, eOpts) { ajaxRequest(sender,"gethtml" , ["_value="+iframe.contentWindow]); } but it doesn't work How can a i get this url ? urlframe.zip Quote
Sherzod Posted May 28, 2018 Posted May 28, 2018 Hi, How can a i get this url ? Try this: ajaxRequest(sender,"geturl" , ["_value="+sender.iframe.src]); Quote
Didier Posted May 28, 2018 Author Posted May 28, 2018 it doesn't work. This url is the first one i go Quote
Sherzod Posted May 28, 2018 Posted May 28, 2018 it doesn't work. This url is the first one i go For security reasons, you can only get the url for as long as the contents of the iframe, and the referencing javascript, are served from the same domain... Quote
Didier Posted May 29, 2018 Author Posted May 29, 2018 In fact, we're going to our website (https://test-wsao.wanao.com) So we have acces to the html is there a way to make them comunicate ? using this way ? https://gist.github.com/pbojinov/8965299 Quote
Sherzod Posted May 29, 2018 Posted May 29, 2018 Ok, then you can try this: iframe.contentWindow.location.href Quote
Didier Posted May 29, 2018 Author Posted May 29, 2018 sorry, i m not clear.my webside is on a domain (sendao.fr)my uniurlframe is on another domain : wanao.comI understand that i can't for security reason.But I can modify the html code of this one too.i think it is possible for them to communicate if i add javascript event in both of the too pages. Quote
Didier Posted May 29, 2018 Author Posted May 29, 2018 My problem here is to set parent javascript to comunicate with an iframe. In html i can do it (cf the link https://gist.github....bojinov/8965299 ). Could you help me ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.