Posts Tagged ‘div’

Css Div kullanımı

Pazartesi, Mayıs 4th, 2009

tagı id elemanı ve style etiketi kullanır
in aldığı değerler
position :  absolute
relative
static
fixed
elemtin kesin olarak verdiğimiz yerdemi yoksa sayfa içerisindeki diğer elemanlara göremi yer değiştireceği.

left -top-width-height :Konumlandırma

clip:shape kırpma
overflow:scroll,visible,hidden eleman içine sığmazsa
verticle -align: baseline,sub,super,top,text-top,middle,bottom,text,bottom,lenght
elemanın dikey olarak nasıl yerleştiriliceği
z-index:1,2,3,4…..99 yerleştirilen elemanın destedeki sırası
visibility : visible,hidden  görünüp görünmemesi

Ajax div yenilemek ( Ajax to refresh div )

Pazartesi, Nisan 27th, 2009

içindeki veriyi sürekli yeniletmek için aşağidaki kod işinizi görecektir. Bütün tarayıcılarda sorunsuz çalışmaktadır.

To the data in the continuously following code to see your work. Works smoothly in all browsers.

<html>
<head>
<script type=”text/JavaScript” language=”JavaScript”>
var xmlHttp=false;
try {
xmlHttp = new ActiveXObject(”Msxml2.xmlHttp”);
} catch (e) {
try {
xmlHttp = new ActiveXObject(”Microsoft.xmlHttp”);
}
catch (E) {
xmlHttp = false;
}
}
if (!xmlHttp && typeof XMLHttpRequest!=’undefined’) {
try {
xmlHttp = new XMLHttpRequest();
}
catch (e) {
xmlHttp=false;
}
}
if (!xmlHttp && window.createRequest) {
try {
xmlHttp = window.createRequest();
}
catch (e) {
xmlHttp=false;
}
}
function callServer(){
//burada çağiracağin sayfayı yazarsın
var url = “xml.asp” + “?tarih=” + new Date().getTime();

xmlHttp.open(”GET”, url, true);
xmlHttp.onreadystatechange = updatePage;{
if (xmlHttp.readyState==4) {
alert(xmlHttp.responseText)
}
}
xmlHttp.send(null)
}
function updatePage(){
//4 sorun yoksa demek
if(xmlHttp.readyState == 4){
//gelen cevap
var response = xmlHttp.responseText;
//hangi  gelcekse buraya yazılcak
okn.innerHTML = response;
//500 milisaniyede bir fonksiyonu cağirir
setTimeout(’callServer()’,500);
}
}
callServer(’url’);
</script>
</head>
< id=”okn”></><!– İçine bilginin geleceği  burasi, id sinin fonksiyondaki id ile aynı olmasına dikkat etmen gerekiyor –>
Oyun Domain Registration Australia
Add to Technorati Favorites Technorati