Support » Themes and Templates » [Resolved] Conditional Tags Trouble

[Resolved] Conditional Tags Trouble

  • Hi there. I’ve got quite big trouble, becouse i’ve don’t have much time. I use Javascript only on main page. I thought that i’ll need PHP Server tag, but i saw in codex conditional tags.

    I’m working at http://misiur.com/immo

    I’ve wrote:

    <?php if(is_home && is_front_page)
    		<script type="text/javascript">
    				window.onload = function()
    				function Load()
    					var z = 0;
    					var q = document.getElementById('body');
    					for(var i=0; i<q.childNodes.length; i++)
    						if(q.childNodes[i].tagName == 'DIV')
    							z += q.childNodes[i].offsetHeight;
    					var spl = document.getElementById('spl_b');
    					var c = document.getElementById('w_mid');
    					var f = document.getElementById('footer');
    					var h = c.offsetHeight - 210;
    					q.style.height = z+"px";
    					spl.style.height = h+"px";
    					c.style.bottom = (h-58)+"px";
    					f.style.bottom = (h-58)+"px";
    		<?php }?>

    But the code is turned on, even on subpages. What is wrong? Help me as fast as You can.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Conditional Tags Trouble’ is closed to new replies.
Skip to toolbar