tarik mang...
Photobucket
gravatar

Preview Gambar dengan Close otomatis

Membuat Preview gambar tampilan pop up dan akan close secara otomatis dalam jangka 10 detik, dan time out 10 detik ini bisa lo rubah sesuai keinginan..untuk contohnya silakan diklik gambar dibawah ini:










Caranya: copy script dibawah ini dan paste di add widget...

<script type="text/javascript"><!--

timeout =10; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=150,top=150,width=" + (WIDTH+50) + ",height=" + (HEIGHT+50);

text = "<html><head><title>Preview</title></head><body bgcolor='white'";

if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";

text += "><center><img src='" + URL + "'>";

if (timeout != 0) text +="<br><font face='arial, helvetica' size='-1'>Preview closes after " + timeout + " seconds.</font>";

text += "</center></body></html>";

preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}
//--></script>


kemudian; copy code dibawah ini dan masukan ketempat dimana anda akan meletakan gambar yg akan dipreview:

<a href="javascript:Start('http://i304.photobucket.com/albums/nn182/ebiets/daffa.jpg', 267, 103)";><img src="http://i304.photobucket.com/albums/nn182/ebiets/daffa.jpg" width=86 height=51></a>


code berwarna merah adalah code gambar yang akan dipreview itu.
selamat mencoba sajah...

gravatar

TOP markotop
Berhasil semua,setelah saya coba
Salam

yoyok

CUAP-CUAP diSINI


ShoutMix chat widget
Photobucket Photobucket
Photobucket Photobucket
Photobucket
Cidaun Blogger