PDA

View Full Version : window resizing issue



wasimkhan
04-08-2009, 11:42 AM
Hi,
I am facing the issue when i try to grab the window for resizing, it resizes itself on a click.
The code is written for a window which is basically a div that one can resize by grabbing it from bottom right corner. This is working fine in IE 7.0, but there is an issue in firefox and opera.
The issue is when i try to grab the window for resizing, it resizes itself on click. It seems to be reducing in size on every click.

this is the code which is actually resizing the div



function startRS(evt) {
var ex = (ie5) ? event.clientX + d.body.scrollLeft : evt.pageX;
var ey = (ie5) ? event.clientY + d.body.scrollTop : evt.pageY;

rsxoff = parseInt(this.style.left) - ex;
rsyoff = parseInt(this.style.top) - ey;
currRS = this;
if (ns6)
d.getElementById(this.cid + "_c").style.overflow = 'hidden';
return false;
}
wRS.onmousedown = startRS;
wRS.onmouseup = stopRS;


Thanks