Removes default drag behaviour on image in Netscape

K

kiran

I am trying to implement a rubber band/image selection script. For
that I need to remove the default drag behaviour on an image. I am
able to do this in IE but not Netscape. Does any one have a solution?

Pls look below for IE code:

var moz = ((document.all)? false : true);
var ie = ((document.all)? true : false);
var ElementUtil = new Object();
ElementUtil.addEventListener = function(o, type, handler) {
if(ie) {
o.attachEvent("on" + type, handler);
}
else if(moz) {
o.addEventListener(type, handler, false);
}
}

// Removes default drag behaviour on image in ie
ElementUtil.addEventListener(img, "drag", function() {return false;});

Thanks in advance
Kiran Makam
 
M

Martin Honnen

kiran said:
I am trying to implement a rubber band/image selection script. For
that I need to remove the default drag behaviour on an image. I am
able to do this in IE but not Netscape.

<img onmousedown="if (event.preventDefault) {
event.preventDefault();
}
return false;"
 
K

kiran

Martin Honnen said:
<img onmousedown="if (event.preventDefault) {
event.preventDefault();
}
return false;"


Thanks Martin, this is exactly what I was looking for. Is there any
website where we can refer Netscape's object model (properties,
methods, events...)?

Kiran Makam
 
T

Thomas 'PointedEars' Lahn

kiran said:
[...] Is there any website where we can refer Netscape's object
model (properties, methods, events...)?

That depends on what you mean by Netscape. For Gecko-based UAs like
Netscape 6+, see

<http://mozilla.org/docs/dom/domref/>
<http://xulplanet.com/references/objref/>

For all Netscape versions and Gecko-based UAs (i.e. for DOM Level 0),
see

<http://web.archive.org/web/20031202201701/devedge.netscape.com/central/javascript/>

For general information see

<http://pointedears.de/ObjectInspector>


PointedEars
 
R

Randy Webb

In response to a message dated 2004 October 5, Thomas 'PointedEars' Lahn
wrote on 2004 October 24, a full 20 days after the thread had ended:
kiran wrote:

[...] Is there any website where we can refer Netscape's object
model (properties, methods, events...)?


That depends on what you mean by Netscape.

Common sense alone indicates he means, ummm, Netscape.

For Gecko-based UAs like Netscape 6+, see

<http://mozilla.org/docs/dom/domref/>
<http://xulplanet.com/references/objref/>

For all Netscape versions and Gecko-based UAs (i.e. for DOM Level 0),
see

<http://web.archive.org/web/20031202201701/devedge.netscape.com/central/javascript/>

Ummm, no. I don't see anything about Javascript 1.2 so it *cant*
possibly be "all Netscape versions".

I prefer this URL to it:

http://www.stud.tu-ilmenau.de/~thla-in/scripts/test/ObjectInspector/nightly/latest/index

Instead of masked pages where they attempt to hide the URL to the page.

But either way, its broken. I will leave it as an exercise to you, to
discover the flaw I found in it.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 24 Oct
2004 10:00:22, seen in Randy Webb
In response to a message dated 2004 October 5, Thomas 'PointedEars' Lahn
wrote on 2004 October 24, a full 20 days after the thread had ended:


Tank Engine is possibly unaware of Usefor Work-In-Progress <URL:
http://www.ietf.org/internet-drafts/draft-ietf-usefor-useage-00.txt>
(CHL, May 2004) :-

3.2.2.1. Quoting and Attributions
....
The followup agent SHOULD also precede the quoted content by an
"attribution line" (however, readers are warned not to assume that
they are accurate, especially within multiply nested quotations). The
following convention for such lines is intended to facilitate their
automatic recognition and processing by sophisticated reading agents.
The attribution SHOULD contain the name and/or the email address of
the precursor's poster, as in
or

The attribution MAY contain also a single newsgroup-name (the one
from which the followup is being made), the precursor's message
identifier and/or the precursor's Date and Time. Any of these that
are present, SHOULD precede the name and/or email address. However,
the inclusion or not of such fields SHOULD always be under the
control of the poster.

To enable this line, and the message identifier and the email address
within it, to be recognized (for example to enable suitable reading
agents to retrieve the precursor or email its poster by clicking on
them), the following conventions SHOULD be observed:
o The precursor's message identifier SHOULD be enclosed within
<...> or <o The precursor's poster's email address SHOULD be enclosed within
<...>
o The various fields may be separated by arbitrary text and they
may be folded in the same way as headers, but attributions SHOULD
always be terminated by a ":" followed by CRLF.

Further examples:

I prefer this URL to it:

http://www.stud.tu-ilmenau.de/~thla-in/scripts/test/ObjectInspector/nightly/late
st/index

Instead of masked pages where they attempt to hide the URL to the page.

But either way, its broken. I will leave it as an exercise to you, to
discover the flaw I found in it.

Is TU-Ilmenau an otherwise reputable institution? Ilmenau itself does
not seem worth indexing in my reasonably-large Atlas.
 
L

Lasse Reichstein Nielsen

Randy Webb said:
Not sure, I can't read what appears to be Danish to me but could just
as well be Swahilian since I can't read it.

Unsurprisingly (from the .de toplevel domain) the page is in German.

The prefix "tu-" in German domain names usually refer to "Techische
Universität", i.e., a technical university (as the copyright notice
also says).
http://www.tu-ilmenau.de/

If anybody can translate it.

I would have supposed that clicking the "Englisch" link at the top left
would help, but it doesn't appear to do anything.

For an automated translation, you can try:
<URL:http://www.systranbox.com/systran/b...ilmenau.de/uni/index.php&systran_f=1098719567>


/L
 
R

Randy Webb

Lasse said:
Unsurprisingly (from the .de toplevel domain) the page is in German.

The prefix "tu-" in German domain names usually refer to "Techische
Universität", i.e., a technical university (as the copyright notice
also says).

I thought maybe German. But German, Danish, or Swahilian, I can't read
any of it :)
I would have supposed that clicking the "Englisch" link at the top left
would help, but it doesn't appear to do anything.

Believe it or not, I did try that, just didn't note it.

Thanks.
 
T

Thomas 'PointedEars' Lahn

Lasse said:
Unsurprisingly (from the .de toplevel domain) the page is in German.

And, unsurprisingly, the home page some people are whining about here
(<http://www.tu-ilmenau.de/>) is not related to me except of that my
website is currently hosted by the computing center of the university;
but then I don't expect people who apparently don't know anything about
DNS to recognize /~thla-in/ as a reference to my home directory there
and the domain I have registered at DENIC (pointedears.de) to be but
a shortcut to that web site (until I'll move it; so far for masking).
The prefix "tu-" in German domain names usually refer to "Techische ^n
Universität", i.e., a technical university (as the copyright notice
also says).

Exactly. And maybe you have heard of the International Student Week
in Ilmenau (ISWI, see <http://iswi.org/>) and the Fraunhofer IDMT
there led by Professor Brandenburg, one of the inventors of MP3,
among others. Then again, maybe you have not ...
I would have supposed that clicking the "Englisch" link at the top left
would help, but it doesn't appear to do anything.

I would be glad if you informed the webmaster about that bug.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Dr John Stockton was again babbling the following incompetent nonsense:
Tank Engine is possibly unaware of Usefor Work-In-Progress <URL:
http://www.ietf.org/internet-drafts/draft-ietf-usefor-useage-00.txt>
(CHL, May 2004) :-

<cite>
Status of this Memo

This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC 2026.

Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.

Internet-Drafts are draft documents valid for a maximum of six
months and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use Internet-Drafts
as reference material or to cite them other than as "work in
progress."

[...]
</cite>

PointedEars
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 7 Nov
2004 18:12:39, seen in Thomas 'PointedEars'
Lahn said:
Dr John Stockton was again babbling the following incompetent nonsense:
Tank Engine is possibly unaware of Usefor Work-In-Progress <URL:
http://www.ietf.org/internet-drafts/draft-ietf-usefor-useage-00.txt>
(CHL, May 2004) :-

<cite>
Status of this Memo

This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC 2026.

Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.

Internet-Drafts are draft documents valid for a maximum of six
months and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use Internet-Drafts
as reference material or to cite them other than as "work in
progress."

[...]
</cite>

That is correct - but have you studied the rest of it? It appears not,
since you are not yet in compliance with its views. It is indeed a
working document, indicating current thinking among a considerable group
of Usenet experts. It is therefore better, as an indication of well-
considered practice, than some ancient material written for users of
some local hierarchy.

So please cease your outdated rantings, and learn to live, as the
majority of the German people have - with some past difficulty - been
persuaded to do, in harmony with the civilised world.

And do not revive ancient threads, unless you have a contribution of
absolute value to make; it is a childish practice. You are not as
important as you think you are.
 

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
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top