Tana blogja
"A gyertya semmit sem veszít azzal, ha lángra lobbant egy másik gyertyát !"   

Div iframe height problem

április 4th, 2007 by Tana
// auto set iframe container div height to content iframe height
function iFrameHeight(framename) {
   
if(document.getElementById && !(document.all))
{
    h = document.getElementById(framename).contentDocument.body.scrollHeight;
    document.getElementById(framename).height = h+40;
}
else if(document.all)
{
   
    h = document.frames(framename).document.body.scrollHeight;
    document.all.contframe.style.height = h;
}
 

Posted in php | No Comments »

JQuery tips

április 4th, 2007 by Tana
// Change textarea color, when focused :

$(function(){
    $("TEXTAREA").focus(function(){
        $(this).css({color: "black", background: "#F0F8FF"});
    })
})

$(function(){
    $("TEXTAREA").blur(function(){
        $(this).css({color: "black", background: "white"});
    })
})

// hide all element in frame : "contframe", which element class begin with "opciotetel" :
contframe.$("[@class^=opciotetel]").hide();
 

Posted in php | No Comments »