Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8047089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:59:44+00:00 2026-06-05T05:59:44+00:00

I have a CMS system and I made an option to manage the ads.

  • 0

I have a CMS system and I made an option to manage the ads. Now what I have is a textbox where the paste their code, and I want to have a fast display of the ad so they can see the ad and if it’s working. The problem is like here: problem to display dynamically a javascript google ad in an iframe using jquery (read the first answer).

I was wondering if it’s somehow possible to do it or the only option is that they can only paste the code, but don’t see it in action from the CMS itself.

EDIT
I’m adding the code:

    <div class="block" data="500" style="margin-top: 5px; height: 644px;">
    <span class="brow" style="float: right;"><span class="label pla">תצוגה מקדימה:</span><div class="dprev"></div></span>
    <span class="brow" style="float: left; margin-top: 0;"><span class="label">הקוד:</span><br />
    <form action="pages/ad.php" target="preview1" method="post">
        <textarea data="1" name="textbox" class="dcode" style="float: none; resize: none; width: 312px; height: 543px;">
            <div style="width:160px;border:solid 1px #E5E5E5">
            <INPUT id="merlin_q3" type="hidden" value="1">
            <SCRIPT type=text/javascript>
            function fnMerlinAddUrl(qStr,val) {
            try{return('&' + qStr + '=' + val)}
            catch(e){}
            }
            //params
            merlin_partnerid = "3541";
            merlin_search="q3";
            merlin_search_result= '6';
            merlin_start_offset= 0;
            merlin_cols = '1';
            merlin_lang="heb";
            merlin_width ="90%";
            merlin_url = "" ;
            merlin_AdType="short_title_heb";
            merlin_Iframe_Unique_Index="3";
            merlin_default = "1";
            merlin_decodeKeyword = escape(document.getElementById("merlin_q3").value);
            var path='http://www.merlin.co.il/merlin_3rdparty/merlin_3rdparty.asp'; //&all=news
            merlin_url=path+"?utf=0&fixed=marimedia&modaa=mo"+fnMerlinAddUrl("partnerid",merlin_partnerid);
            merlin_url+=fnMerlinAddUrl("lang",merlin_lang);
            merlin_url+=fnMerlinAddUrl("AdType",merlin_AdType);
            merlin_url+=fnMerlinAddUrl("qtyResult",merlin_search_result);
            merlin_url+=fnMerlinAddUrl("ScriptIndex",merlin_Iframe_Unique_Index);
            merlin_url+=fnMerlinAddUrl("start_offset",merlin_start_offset);
            merlin_url+=fnMerlinAddUrl("cols",merlin_cols);
            merlin_url+=fnMerlinAddUrl("merlin_default",merlin_default);
            merlin_url+='&q=' +merlin_decodeKeyword;
            merlin_url+='&urlTag='+ "http%3A%2F%2Ftracking.merlin.co.il%2Faff_c%3Foffer_id%3D58%26aff_id%3D1216%26file_id%3D1652";
            document.write("<table width=100%><tr><td valign=top id='Merlin_tdInsert3'></td></tr></table>");
            var MerlinSS_OBJ=document.getElementsByTagName("HEAD");
            if(!MerlinSS_OBJ)document.createElement('HEAD');
            var  oScript= document.createElement("script");
            oScript.setAttribute("src",merlin_url); 
            document.getElementsByTagName("HEAD")[0].appendChild(oScript);
            </SCRIPT>
            </div><img src="http://tracking.merlin.co.il/aff_i?offer_id=58&aff_id=1216&file_id=1652" width="1" height="1">
        </textarea>
    </form></span>
    <button style="position: absolute; margin-right: 330px; bottom: 14px;"><img src="img/v.png" style="margin-top: -2px; margin-left: 2px;" alt="add" height="28"/>שמור שינויים</button>
</div>
<h1 style="margin-top: -45px; position: relative;right: 574px;">פרסומת 2:</h1>
<div class="block" data="500" style="margin-right: 45px; height: 644px; margin-top: 5px;">
    <span class="brow" style="float: right;"><span class="label pla">תצוגה מקדימה:</span><div class="dprev"></div></span>
    <span class="brow" style="float: left; margin-top: 0;"><span class="label">הקוד:</span><br />
    <form action="pages/ad.php" target="preview2" method="POST">    
        <textarea data="2" class="dcode" style="float: none; resize: none; width: 312px; height: 543px;">
            <script type="text/javascript"><!--
            google_ad_client = "pub-2151667935419035";
            /* 120x600, created 7/17/08 */
            google_ad_slot = "8233032726";
            google_ad_width = 120;
            google_ad_height = 600;
            //-->
            </script>
            <script type="text/javascript"
            src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script>
        </textarea>
    </form></span>
    <button style="position: absolute; margin-right: 330px; bottom: 14px;"><img 

    src="img/v.png" style="margin-top: -2px; margin-left: 2px;" alt="add" height="28"/>שמור שינויים</button>
    </div>
    <script>
    $("textarea.dcode").each(function (){
        $(this).closest("div").children("span:first-child").children("div.dprev").html('<iframe class="adprev" name="preview'+$(this).attr("data")+'" src="pages/ad.php"></iframe>');
        $(this).val($(this).text());
        $('form[target="preview'+$(this).attr("data")+'"]').submit();
    }).keyup(function (){
        $(this).closest("div").children("span:first-child").children("div.dprev").html('<iframe class="adprev" name="preview'+$(this).attr("data")+'" src="pages/ad.php"></iframe>');
        $('form[target="preview'+$(this).attr("data")+'"]').submit();
    });
    </script>

there is some other language there but that’s not important, as you can see i have two iframes, but the code only works for the first. (first is merlin ads and second is google ads, but even i put the merlin in the second textbox it’s not working).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:59:46+00:00Added an answer on June 5, 2026 at 5:59 am

    I have not tried this solution myself, but you will probably need to do something like this:

    1. Create dinamically iframe with the url from your server and pass there your textbox value (let’s say iframe1.html?textbox=<encoded text from the textbox>). This will be allowed, as you do that in the same domain.
    2. On the server while rendering iframe1.html insert there one more iframe with what you try to do now. That would now seem static to browser!
    3. You will have iframe inside iframe. But you will not any more create cross-domain iframe by javascript.
    4. Profit!

    Hope it will help! And if it will, please let me know, I am interested myself)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made few projects (CMS and EC system) that required to have some
I have a CMS system that allows people to also use HTML code, but
I have an application that used another php cms system, which I am now
I have a custom made CMS system with a relatively small number (~1000) of
I have a cms system for multiple clients. Now i have the following controller:
I have implemented Code Mirror as a plugin into a CMS system. I have
I have requirements to establish a CMS system for enterprise and it has to
Our in-house built CMS system has the ability to have descriptive url ( Descriptive
I am working on a CMS system tries to support multilingual natively. I have
I have a 'template' system in my CMS rails app. Basically the whole HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.