get partnerid from iframe using js RRS feed

  • Question

  • User932259438 posted


    I have like that:
    <script src="https://www.xxx/js/adbanners.js"></script>
    <iframe id="leaderboard728x90" src="https://wwwxxx/banners/120x600_skyscraper_1/index.html" partnerid="uQh86v9n60" />

    How can I get partnerid and add like that:

    gwd.auto_Gwd_taparea_1Action = function (event) {
        gwd.actions.gwdDoubleclick.exitOverride("gwd-ad", "goto site", "https://wwwxxx?partnerid=" + partnerid);

    Friday, December 30, 2016 8:36 PM

All replies

  • User-474980206 posted

    var partnerid = document.getElementById('leaderboard728x90').getAttribute('partnerid');

    Saturday, December 31, 2016 1:51 AM
  • User-1838255255 posted

    Hi progy85,

    According to your description, I agree bruce's reply to get value, about how to add it as parameter to URL, I make  a sample, please refer to this sample:

        <meta charset="utf-8" />
            window.onload = function () {
                var value = document.getElementById("paenet").getAttribute("partnerid");
                var url = window.location.href;    
                var newurl = url + "?partnerid=" + value;
        <iframe id="paenet" partnerid="uQh86v9n60"></iframe>


    Best Regards,

    Eric Du

    Tuesday, January 3, 2017 9:13 AM