Closed Thread Icon

Preserved Topic: Annoyance (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=15482" title="Pages that link to Preserved Topic: Annoyance (Page 1 of 1)" rel="nofollow" >Preserved Topic: Annoyance <span class="small">(Page 1 of 1)</span>\

 
Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 00:02

Alright, let me explain the problem I'm having, and then pose the question.

Most of you probably know how when you put your mouse over an image, hold the button down, and then move the mouse, in most browsers the cursor changes to a circle with a cross through it, indicating that the image cannot be dragged.

What this does is mess up the mousemove, mousedown, and mouseup events with images. I find it quite annoying. I would like to create the effect of dragging images around, but this prevents it.

I've seen other people do this sucessfully, however: DHTML scroll bars, mbridge's window-dragging page, and some other things have had the effect. I myself have once come close by putting an invisible DIV tag over the images, but it didn't work in IE all the time, for a reason that I couldn't figure out.

SO... my question is, has anyone found a solution to this, and if so, what is it?

Any help is welcome... but, er, please don't make really really long posts to start off with because I get so bored reading posts like that. =D Keep it short, if you can.

Thanks!

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 09-07-2000 00:29

Hmmm the solution I use for something like this is by tracking the mouse position on mouse down. If the mouse position is within the coords of the image then it changes the position of the DIV on the move. check out http://www.bitdamaged.com/testpages/Sliders
for an example. just move the squares around. This was just a test so I never made it NN compatible and I never wrote the funcionality to change the z-indexes on the click. (that gets a little tricky)

Hope it helps



Walking the Earth like Kane

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-07-2000 02:08

Ah yes the infamous should browser drag image or not problem. This nearly prevented the BugWeaver's sliders from ever seeing the light of day. This was the work around I came up with:

I created a table with 1 pixel wide blank.gif images to maintain its size while setting the background image of the table to what I wanted the user to see.

Here is the div code I use on the BugWeaver for the slider nobs:

<DIV ID="elDRAGOne">
<table border="0" cellspacing="0" cellpadding="0" background="gfx/alpha_knob.gif">
<tr><td colspan=2><IMG SRC="gfx/blank.gif" WIDTH=18 HEIGHT=1 border=0 alt=""></td></tr>
<tr><td width=1><IMG SRC="gfx/blank.gif" WIDTH=1 HEIGHT=18 border=0 alt=""></td>
<td width=38> </td></tr></table>
</DIV>

This seems to take care of it pretty well. I think this solves what you are dealing with.



[This message has been edited by Bugimus (edited 07-09-2000).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 02:22

Oh, wow, that's really smart - that way, the images only cover the top and left pixels of the image being dragged.

I'm going to test this out now... I'll brb with the results!

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 02:47

AAAAUGH

Well, your actual responses weren't much help to me. I tried doing what you said and it still wasn't consistently working.

Then I looked closer at the code to the page that bitdamaged linked to, and noticed a

return false;

in the document.onmousemove event. I stuck it into my code, et voila, no more problems. Although, it also prevents the user from selecting any text, unless I use some if statements to return false only when they're using the scroller.

Wow, I'm very happy! Hey, someone with IE 5.5 test this - if it works, it'll make my day!
http://www.karl.nu/slime/misc/dhtmlscroll/

-Slime

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-07-2000 02:53

I'm not seeing any images on the page <img border=0 align=absmiddle src="http://www.ozones.com/forum/eek.gif">



Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 02:56

Yeah, I messed up the upload, should be OK now. Try again.

BTW, let the page load completely before doing anything with it, just in case. Normally, it wouldn't be a problem, but the page isn't completed yet.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-07-2000 03:21

Slime,

It works very well on my PC using IE5.5 and NN4.7

On my Mac, um, not so good. IE5 allows the scroller to work but you can't select any of the text including clicking the link at the bottom.

Netscape on the Mac is even stranger. You can see the text ok but you can see any of the scroll bar buttons. They just disappear.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 09-07-2000 03:22

Works for me in IE 5.5 (PC)


Walking the Earth like Kane

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 03:26

I wish I had the ability to test pages on macs. I've had the mac IE 5 problem before, it seems as though a div within a div can't be selected or anything, or maybe its something else about the way I do it. As for netscape on mac, well, nothing i can really do.

What percent of the population uses macs, anyway?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 03:29

And how on earth can you afford to maintain two computers at once??? =D

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-07-2000 03:34

I think the good Doc might have something to say about that last comment <img border=0 align=absmiddle src="http://www.ozones.com/forum/wink.gif"> <img border=0 align=absmiddle src="http://www.ozones.com/forum/biggrin.gif"> <img border=0 align=absmiddle src="http://www.ozones.com/forum/wink.gif"> Macpeople are a proud and noble breed.

Excellent work, Slime. I'm curious how you fixed the images being dragged by IE5 problem?



[This message has been edited by Bugimus (edited 07-09-2000).]

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-07-2000 03:37

I may have mislead you a bit. I have PCs at home but all sorts of computers at work. The Macs I'm talking about are at work.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 03:51

Oh! I see.

Of course, I didn't intend to offend anyone with that comment.

The only thing that fixed the problem was putting a "return false;" inside the function that was being used as document.onmousemove. I guess that told the browser that my code was handling the event fine, and I didn't want it butting in with it's own drag-and-drop stuff.

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 09-07-2000 10:04

Hey, great bit of information! I just used that "return false;" bit myself in my latest DHTML scrollbar, it fixed my last remaining problems with it.

See -> http://www.primalcontent.com/clients/electrofab/content.html

For my part, I use the mousemove bit to check the "where" of where your mouse is, if it's in the zone set aside for scrolling, then certain variables are set. I used the return false; in the onMouseDOWN function, if those variables are set. This way it does what I want with the scroller, but leaves the rest of the page OK for clicking and dragging. If anyone would like this script, it's *really* streamlined, only 65 lines *with copyright*, heh heh. No comments, but speed was an issue, comments are the first thing to go!

Code -> http://www.primalcontent.com/clients/electrofab/scripts/scrollbar.js

Comments appreciated, of course!


Your pal, -doc-

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 21:21

Very nice code, Doc. Extremely short, too! I noticed one problem... drag all the way to the bottom, and keep holding the mouse down, and look at the text's position. Then release the mouse button, and the text moves - even though you haven't moved the scroll bar. (The amount that the text moves is dependent on where on the slider you click.) It's not a huge problem, of course. I'm not sure I even explained it well.

Hmm. I wonder what your code has that mine doesnt that makes yours work in macs?

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 09-08-2000 03:50

I don't want to swipe the code - I want to swipe your variation of Lorem ipsum -- I laughed out loud in a room by myself when I read "Et harumd und lookum like Greek to me,
dereud"

<img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

Now, why do I have to click "Go to scrollbar not visible ", and then click "Go to scrollbar visible" before I cansee the scrollbars? Once I've hopped around and get back to the first page, the scroll bars are splendid!

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 09-08-2000 08:17

OK, try this one...

See -> http://www.primalcontent.com/clients/electrofab_final/

I had to make the code just a *bit* longer, stepping through and stripping out all of the fixed values and making a 'config' section for all of the variables. I really want these folks to just pay me for the script, not just strip out my stuff and re-write it, so the code is left in a short, terse, maximum confused state, heh.

I went through some hell trying to be *certain* that IE and Netscape would not trigger the drag&drop fuction, had to return false in several different places for IE, but trap Netscape out of that 'falseness' otherwise the links wouldn't work either!

Steve, you're a Netscape user, right? I don't really know what or why that happens, why won't my layers write out as visible? Now you enter into into the site from elsewhere, seems as long as you *link* to the page, the functions process, if you just load the page, it doesn't! Netscape, grr. Only jarring note on an otherwise good script.

Hmm? Scrolling and dragging makes it jump some? There's a few issues with the scroller and dragger being different sizes from the text, I'll have to look at that closer and see if I can see what you see!

Your pal, -doc-

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 09-09-2000 00:01

uh - Doc? Second one doesn't produce scrollbars for me (Mac NN 4.6).

First script in this thread worked (with the mentioned exception that you can't load it directly, which is what happens when linkng from the Asylum);

Second script gives me up & down arrows (on the left of text), but no "thumb" and no scroll action

<img border=0 align=absmiddle src="http://www.ozones.com/forum/frown.gif">

mikey milker
Paranoid (IV) Mad Scientist

From:
Insane since: Apr 2000

posted posted 09-09-2000 00:46

doc: worked for me in IE/NN... beautiful... maybe, erm.. i'd er, like to use that guy on my next web design for my personal site. *big grin*

cheers.mikey.milker

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-09-2000 02:44

It worked like a charm on every platform I have at my disposal. Mac: IE5 & NN4.7, PC IE5.5 & NN4.7, and even NN4.5 on the Sun.

"Lord, grant that I may always desire more than I accomplish." --Michelangelo

Doc, you ensure that this quote remains a reality for me. <img border=0 align=absmiddle src="http://www.ozones.com/forum/biggrin.gif">

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 09-09-2000 03:56

Well said bugimus.... Doc may be an inspiration to many more than us...



tskull@techie.com">

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 09-09-2000 05:16

Woops.

Tried it again at home, same platform, same NN version, different computer; it works now.

Sigh.

Go figure.

<img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

« BackwardsOnwards »

Show Forum Drop Down Menu