[Linux-programlama] DOM ile resim ekleme

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: veli akcakaya (v.akcakaya@gmail.com)
Date: Sat 01 Oct 2005 - 13:49:41 EEST


Merhabalar,
aşağıdaki kod ile bir iframe içerisine bir buton'a tıklayınca server'da
belirtilen dosyayı eklemek istiyorum. Aşağıdaki kod ile dosyayı body
içerisine ekleyebilirken, bir türlü iframe içerisine ekleyemedim. Buton'a
tıklayınca dosyayı iframe içerisine nasıl ekleyebilirim. Şimdiden
teşekkürler,
iyi çalışmalar...

<html>
<head>
<title>Resim ekleme örneği</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
<script language="javascript1.2">
<!--
function Ekle() {
var al=document.getElementsByTagName("body")[0];
var oImg=document.createElement("img");
oImg.setAttribute('src', 'prj/images/taslak_21.gif');
oImg.setAttribute('alt', 'alternate text');
oImg.setAttribute('height', '50px');
oImg.setAttribute('width', '50px');
// append
al.appendChild(oImg);
alert(al);
}
-->
</script>

</head>
<body>
<iframe id="test" name="test" frameborder="1"></iframe><br>
<input type="button" onClick="Ekle()" value="Resim Ekle">
</body>
</html>

--
v e l i a k ç a k a y a
-------------------------
(http://www.akcakaya.org)

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.