PHP
1
Вклад в тег
<div url-show="http://docs.google.com/viewer?url=http://amiro.ru/_mod_files/_upload/example.doc&embedded=true" class="show_docs" onclick="showDocs(this); return false;">
<script>
function showDocs(oLink) {
var oBlock = oLink.getElementsByTagName('div')[0];
var oIframe = oLink.getElementsByTagName('iframe')[0];
var oIframeUrl = oLink.getAttribute('url-show');
if(oBlock.style.height == 0+'px') {
oBlock.style.height = 980+'px';
if(oIframe.src != oIframeUrl) {oIframe.src = oIframeUrl};
} else {
oBlock.style.height = 0+'px';
}
}
</script>