Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-27-2008, 12:31 PM   PM User | #1
mugalata
New to the CF scene

 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mugalata is an unknown quantity at this point
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ıç</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
mugalata is offline   Reply With Quote
Old 08-27-2008, 10:26 PM   PM User | #2
mugalata
New to the CF scene

 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mugalata is an unknown quantity at this point
i've solved problem. i've learned from somebody in another forum.

default.html is like that anymore.

Quote:
<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..
mugalata is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:51 AM.


Advertisement
Log in to turn off these ads.