hey,
i am working on a webdesign for my boss and i was doing some scripting cause he wanted to be able to "zoom/enlarge" something using a simple zoombutton.
the code i wrote works perfectly in firefox en safari, but in ie7 and ie8 it just doesn't :(
var checker=true;
$('sparanimatieB').observe('click', function(event){
if(checker==true)
{
$('sparanimatie2').writeAttribute("width","427px");
$('sparanimatie2').writeAttribute("height","405px");
$('sparanimatie3').writeAttribute("width","427px");
$('sparanimatie3').writeAttribute("height","405px");
Element.extend($('sparanimatie'));
$('sparanimatie').setStyle({"width":"427px"});
$('sparanimatie').setStyle({"height":"405px"});
$('sparanimatie').setStyle({"position":"absolute","left":"-100px"});
checker = false;}
else
{
$('sparanimatie2').writeAttribute("width","227px");
$('sparanimatie2').writeAttribute("height","205px");
$('sparanimatie3').writeAttribute("width","227px");
$('sparanimatie3').writeAttribute("height","205px");
Element.extend($('sparanimatie'));
$('sparanimatie').setStyle({"width":"227px"});
$('sparanimatie').setStyle({"height":"205px"});
$('sparanimatie').setStyle({"position":"absolute","left":"0px"});
checker = true;}
});
i thought it might have something to do with the "writeAttribute" function so i changed it to this
var checker=true;
$('sparanimatieB').observe('click', function(event){
if(checker==true)
{
$('sparanimatie2').setStyle({"width":"427px"});
$('sparanimatie2').setStyle({"height":"405px"});
$('sparanimatie3').setStyle({"width":"427px"});
$('sparanimatie3').setStyle({"height":"405px"});
Element.extend($('sparanimatie'));
$('sparanimatie').setStyle({"width":"427px"});
$('sparanimatie').setStyle({"height":"405px"});
$('sparanimatie').setStyle({"position":"absolute","left":"-100px"});
checker = false;}
else
{
$('sparanimatie2').setStyle({"width":"227px"});
$('sparanimatie2').setStyle({"height":"205px"});
$('sparanimatie3').setStyle({"width":"227px"});
$('sparanimatie3').setStyle({"height":"205px"});
Element.extend($('sparanimatie'));
$('sparanimatie').setStyle({"width":"227px"});
$('sparanimatie').setStyle({"height":"205px"});
$('sparanimatie').setStyle({"position":"absolute","left":"0px"});
checker = true;}
});
but it still aint working in internet explorer :(
i thought prototype was to erase all browser"inefficiencies" :( ?
that's the whole purpose i tried learning it XD