...

View Full Version : select boxes in iframe disappear



mugalata
08-27-2008, 01:31 PM
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

<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


<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>

mugalata
08-27-2008, 11:26 PM
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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum