472,784 Members | 796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 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 1535


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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.