Weird Event Issues (Need Help!)

J

Jason R. Fayling

I have been banging my head against the wall on this problem for a few
hours now, and it is time I ask for help!

IMPORTANT: This example is for IE only.

I am trying to develope a vertical/horizontal splitter control using
JavaScript. I have gotten all the preliminary code developed, and it
seems to work (some of the time.) Copy and paste the below code into
a new HTML file and run. You will see three panels: red, blue, and
yellow. Drag the bar that sits between the blue and yellow panels up
or down, notice how the ghost bar follows the mouse. When you let go
of the mouse, the blue and yellow panels resize based on the new bar
position. Now, do the same thing for the bar that sits between the red
panel and the blue/yellow panels. Again you will see that everything
is working the way it should.

Now for the problem. After you have resized the vertical splitter, go
back and resize the horizontal. Notice now that the ghost bar is no
long synced up with the mouse. I can't seem to figure out what is
going on here. I think the problem is with the function moveBar (line
127 in the source.)

Can anybody figure this out?

-----------------------------------------------------------------
Source Code Below

Since the source code is pretty big, I have placed it on SecurePaste.
Just enter the URL below to see the source.

http://www.fayling.com/WebApps/SecurePaste/displayPost.aspx?id=183&addnumbers=1
-----------------------------------------------------------------

-----------------------------------------------------------------
EXAMPLE

http://www.fayling.com/webapps/research/resize2.htm
-----------------------------------------------------------------


Thanks for your time.

Jason R. Fayling.
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top