DIV-based "window popups": Cross-browser issue.

  • Thread starter Joel A. Villarreal Bertoldi
  • Start date
J

Joel A. Villarreal Bertoldi

Hey there,

I've written my own library to generate "window popups" using DIV's,
with drag&resize support enabled. It works perfectly under Firefox 3,
but IE7 doesn't like it. The window can only be rendered and closed,
no drag nor resize working.

The source code for it it's located here:
http://pastebin.com/m2426c814

An usage sample can be found here:
http://www.cordobasitios.com.ar/private/panels/

I believe the problem is somewhere within the this.BeginDrag() and
this.StopDrag() handler functions, yet I can't figure it out.

Any ideas?

Regards,
Joel A. Villarreal Bertoldi
CordobaSitios.com
 
R

rf

Joel A. Villarreal Bertoldi said:
Hey there,

I've written my own library to generate "window popups" using DIV's,
with drag&resize support enabled.

Wow, all of that for a little drag/drop and resize?
 
J

Joel A. Villarreal Bertoldi

Wow, all of that for a little drag/drop and resize?

It's not just that. The library also works with window themes and DOM-
based element adding.
 
T

Thomas 'PointedEars' Lahn

Joel said:
I've written my own library to generate "window popups" using DIV's,
with drag&resize support enabled. It works perfectly under Firefox 3,
but IE7 doesn't like it. The window can only be rendered and closed,
no drag nor resize working.

The source code for it it's located here:
http://pastebin.com/m2426c814

<blockquote>

_getBrowser:
function() {
if (document.all)
return "IE";
else if (document.getElementById)
return "FF";
else
return false;
},

</blockquote>

This method indicates object inference; deprecated, error-prone late
20th-century coding style (and the tabs instead of few spaces, and the lack
of braces don't make it easier to read either). Use feature testing
instead, and block statements, and see if that helps.

*************.com

Please don't spam here. Use properly delimited signatures to refer to your
plain Web site, if necessary.


PointedEars
 
R

rf

Joel A. Villarreal Bertoldi said:
It's not just that. The library also works with window themes

Ah yes. But do you really need to do all of that theme processing at every
mouse move, just to get what looks like a shadow offset? That sort of
initialization stuff should be done in your initialization routine, or at
worst at mousedown.

Similar for those repeated calls to parseInt. Parse the height once and
store it away.

Mousemove is a very frequent event. You should be doing as little as
possible in there. Your implementation takes my CPU to over 100%, meaning
that you are not processing every mouse move event. This makes things jerky
and slow looking.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top