Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    select boxes in iframe disappear

    hi,
    i have a page and a div in it with display none.
    when i click a link(first, second) current iframe goes to invisible div and chosen iframe coming from invisible div. But if my iframe has select boxes, i could not see select boxes in it, when i sent it to invisible div and called back from invisible div.
    codes are below. you can try, too.
    thanks for your helps...


    i've changed my code to html page instead of asp page.


    default.html
    Code:
    <html>
    <body>
    <!--an invisible div-->
    <div id="invisibleDiv" style="display:none;">
    <iframe id="bilgi" src="bilgi.asp"></iframe>
    </div>
    <a href="javascript:iframeYukle('mugalata')">first</a>
    <a href="javascript:iframeYukle('bilgi')">second</a>
    <!--a div keeping iframe-->
    <div id="middleDiv">
    <iframe id="mugalata" src="mugalata.html"></iframe>
    </div>
    <!--javascript function-->
    <script type="text/javascript">
    function iframeYukle(pGelen)
    {
    	document.getElementById("invisibleDiv").appendChild(document.getElementById("middleDiv").firstChild) ;
    	document.getElementById("middleDiv").appendChild(document.getElementById(pGelen)) ;
    }
    </script>
    </body>
    </html>


    mugalata.html
    Code:
    <div id="divYillar">
        <form id="frmYillar" name="frmYillar">
            <table id="tblYillar" name="tblYillar">
                <tr>
                    <td align="left"><span class="spanYillar">Başlangı&#231;</span><br>
                    <select onChange="javascript:baslangicDegisti()" class="spanYillar" id="listeYilBaslangic" name="listeYilBaslangic">
                  <option value='2000' selected='selected'>2000</option>
    			  <option value='2001'>2001</option>
    			  <option value='2002'>2002</option>
    			  <option value='2003'>2003</option>
    			  <option value='2004'>2004</option>
    			  <option value='2005'>2005</option>
    			  <option value='2006'>2006</option>
    			  <option value='2007'>2007</option>
    			  <option value='2008'>2008</option>
                    </select>
                    </td>
                    <td align="right"><span class="spanYillar">Bitiş</span><br>
                    <select class="spanYillar" id="listeYilBitis" name="listeYilBitis">
                    <option value='2008'>2008</option>
                    </select>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    Last edited by mugalata; 08-27-2008 at 03:13 PM. Reason: to change the code

  • #2
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i've solved problem. i've learned from somebody in another forum.

    default.html is like that anymore.

    <html>
    <body>
    <!--an invisible div-->
    <div id="invisibleDiv" style="display:none;"><iframe id="bilgi" name="bilgi" src="bilgi.asp"></iframe>
    </div>
    <a href="javascript:iframeYukle('mugalata')">first</a>
    <a href="javascript:iframeYukle('bilgi')">second</a>
    <!--a div keeping iframe-->
    <div id="middleDiv"><iframe id="mugalata" name="mugalata" src="mugalata.html"></iframe></div>
    <!--javascript function-->
    <script type="text/javascript">
    function iframeYukle(pGelen)
    {
    var kopyaNode = document.getElementById("middleDiv").firstChild.cloneNode(true) ;
    document.getElementById("middleDiv").removeChild(document.getElementById("middleDiv").firstChild) ;
    document.getElementById("invisibleDiv").appendChild(kopyaNode) ;
    document.getElementById("middleDiv").appendChild(document.getElementById(pGelen)) ;
    }
    </script>
    </body>
    </html>
    Last edited by mugalata; 08-27-2008 at 10:28 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •