473,414 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Removes default drag behaviour on image in Netscape

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
Jul 23 '05 #1
11 1564


kiran wrote:
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;"

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<41**********************@newsread2.arcor-online.net>...

<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
Jul 23 '05 #3
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. 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
--
You know that feeling when you're leaning back in a chair, and you're
Jul 23 '05 #4
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".
For general information see

<http://pointedears.de/ObjectInspector>


I prefer this URL to it:

http://www.stud.tu-ilmenau.de/~thla-...y/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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #5
JRS: In article <FI********************@comcast.com>, dated Sun, 24 Oct
2004 10:00:22, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
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:

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
Joe D. Bloggs <jd******@foo.example> wrote:
or
Helmut Schmidt <he****@bar.example> schrieb:

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 <news:...>
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:

On comp.foo in <12**@bar.example> on 24 Dec 2001 16:40:20 +0000,
"Joe D. Bloggs" <jd******@bar.example> wrote:
Am 24. Dez 2002 schrieb Helmut Schmidt <he****@bar.example>:

For general information see

<http://pointedears.de/ObjectInspector>


I prefer this URL to it:

http://www.stud.tu-ilmenau.de/~thla-...r/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.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #6
Dr John Stockton wrote:
JRS: In article <FI********************@comcast.com>, dated Sun, 24 Oct
2004 10:00:22, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
<--snip-->
Is TU-Ilmenau an otherwise reputable institution? Ilmenau itself does
not seem worth indexing in my reasonably-large Atlas.


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.

http://www.tu-ilmenau.de/

If anybody can translate it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #7
Randy Webb <Hi************@aol.com> writes:
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/box?systran_lp=de_en&systran_id=SystranSoft-en&systran_url=http://www.tu-ilmenau.de/uni/index.php&systran_f=1098719567>
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #8
Lasse Reichstein Nielsen wrote:
Randy Webb <Hi************@aol.com> writes:

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).


I thought maybe German. But German, Danish, or Swahilian, I can't read
any of it :)
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.


Believe it or not, I did try that, just didn't note it.
For an automated translation, you can try:
<URL:http://www.systranbox.com/systran/box?systran_lp=de_en&systran_id=SystranSoft-en&systran_url=http://www.tu-ilmenau.de/uni/index.php&systran_f=1098719567>


Thanks.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #9
Lasse Reichstein Nielsen wrote:
Randy Webb <Hi************@aol.com> writes:
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.


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 ...
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.


I would be glad if you informed the webmaster about that bug.
PointedEars
Jul 23 '05 #10
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
--
The streets will run red with the bllod of the unbelievers! ;)
Jul 23 '05 #11
JRS: In article <19****************@PointedEars.de>, dated Sun, 7 Nov
2004 18:12:39, seen in news:comp.lang.javascript, Thomas 'PointedEars'
Lahn <Po*********@web.de> posted, quoting without any indication an
article now over a fortnight old :
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.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Tuck | last post by:
Hi The following functions are working propery for IE, Ns 4.x and NS 6+ but the image I want to display disappears in IE. Why? function swapPic(layer,imgName,imgObj) { o = (n &&...
2
by: yihan | last post by:
Hi, I made a program to drag and drop the image using mouseevent, it only works on IE well, not on Netscape. Does anyone has the example suitable for Netscape? Please help. Thank you very much. ...
2
by: Lars Forslin | last post by:
I have a problem with making image hyperlinks work in Firefox/Netscape. It seems the clickable area is narrowed down to a small area in the middle of the image, around the edges or gone altogether....
1
by: kiran | last post by:
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...
1
by: Ryan Stewart | last post by:
If you don't want to read this post because of its length, I understand. I've spent two and a half days on this problem and have a good deal of information to relate. And this is kind of a long...
8
by: ericgorr | last post by:
I have the following test page: http://ericgorr.net/test.html <html> <head><title>Simple JavaScript</title></head> <BODY ondragstart="alert(event.srcElement.tagName)"> <INPUT TYPE=text...
2
by: sebastian.janoschka | last post by:
Hi, I build my first Drag & Drop with JavaScript and I would like to drag the pictures when I click on it. When I create a normal div tag with some text the script works, but when I put a...
10
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.