Javascript to check parent url from iframe
Project ID:
567417
Project Type:
Fixed
Budget:
$30-$250 USD
Project Description:
I need a javascript code that will check if the embed code provided on my website was not changed when used on someone elses website. Embed uses iframe and javascript from iframe must check if parent url contains the embed code as provided.
Example of embed code:
<div style="background:#FFFFFF; font:Arial; color:#000000; font-size:12px; width:468px"><b>ANY TEXT</b> // <a href="http://www.Domain.com/" target="_blank" style="color:#0000FF;">TEXT</a> on <a href="http://www.Domain.com/" target="_blank" style="color:#0000FF;">http://www.Domain.com</a><iframe name="stream" src ="http://www.Domain.com/embeded.php?channelId=anynumber" width="468px" height="352px" frameborder="0" style="padding:0px; margin:0px;" scrolling="no" ></iframe></div>
idealy javascript would parse the paront url and see if above code was not modified and if it was it should show some other ducument in iframe
Skills required:
AJAX,
Javascript
Public Clarification Board
0 messages