[quote=bintangkesiangan]minta kode yg poto viewer nampil d primari kita dong dong dong 

[/quote]

[quote]simply, taro ni kode d bag C:
[spoiler](function () {
	PRIMARYIMG = {
		// private property
		photo: null,
		getPrimaryPic: document.getElementById("content_0").getElementsByTagName("a")[0],
		init: function () {
			if (pageViewerID !== "" || pageViewerID !== pageOwnerID) {
				try {
					sendXMLHttpRequestText("http://" + location.hostname + "/" + pageViewerID, "PRIMARYIMG.viewer");
				} catch (e) {}
			}
		},
		viewer: function (htm) {
			if (htm.replace(/^\s*|\s*$/g, "") === "") {
				window.alert("ERROR: Empty xmlresponse! \n Unable to parse your details!");
				return;
			} else {
				htm = htm.slice(htm.indexOf("<div class=\"imgblock200\">") + 0, htm.indexOf("<ul id=\"controlPanelButtons\">") + 0);
				htm = htm.slice(htm.indexOf("<a href=\"") + 0, htm.indexOf("</a></div>") + 4);
				PRIMARYIMG.photo = document.createElement("div");
				PRIMARYIMG.photo.className = "img200";
				PRIMARYIMG.photo.innerHTML = htm;
				PRIMARYIMG.getPrimaryPic.parentNode.replaceChild(PRIMARYIMG.photo, PRIMARYIMG.getPrimaryPic);
			}
		}
	};
	PRIMARYIMG.init();
})();[/spoiler][/quote]
 
					Last edited by Da BucKz (2008-12-17 06:48:28)