473,770 Members | 5,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.add EventListener = function(o, type, handler) {
if(ie) {
o.attachEvent(" on" + type, handler);
}
else if(moz) {
o.addEventListe ner(type, handler, false);
}
}

// Removes default drag behaviour on image in ie
ElementUtil.add EventListener(i mg, "drag", function() {return false;});

Thanks in advance
Kiran Makam
Jul 23 '05 #1
11 1595


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.preventD efault) {
event.preventDe fault();
}
return false;"

--

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

<img onmousedown="if (event.preventD efault) {
event.preventDe fault();
}
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.netscap e.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.netscap e.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.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #5
JRS: In article <FI************ ********@comcas t.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
"attributio n 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.e xample> wrote:
or
Helmut Schmidt <he****@bar.exa mple> 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.examp le> on 24 Dec 2001 16:40:20 +0000,
"Joe D. Bloggs" <jd******@bar.e xample> wrote:
Am 24. Dez 2002 schrieb Helmut Schmidt <he****@bar.exa mple>:

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.demo n.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************ ********@comcas t.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.javas cript 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_i d=SystranSoft-en&systran_url= http://www.tu-ilmenau.de/uni/index.php&systr an_f=1098719567 >
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.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_i d=SystranSoft-en&systran_url= http://www.tu-ilmenau.de/uni/index.php&systr an_f=1098719567 >


Thanks.

--
Randy
comp.lang.javas cript 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

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

Similar topics

2
1883
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 && layer?document.layers.document.images:document.images); if(!o.hasswapped) o.src = eval(imgObj+".src"); }
2
1629
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. yihan
2
2000
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. Very irregular. It seems to be the worst if images are wrapped into nested divs. Take a look at http://www.monarda.se/webb.htm All the images are linked to the different sites they represent. The ones at the right are wrapped in divs, the ones...
1
1560
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 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) {
1
4967
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 shot, but I'm just hoping someone here has experienced a similar problem and has a better idea of what's going on than I do. First, I've tested this in IE 6.0, Netscape 7.2, Mozilla 1.75, and Firefox 1.0. It works fine in IE (even though I was...
8
4553
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 VALUE="Select and drag this text"> <SPAN >Select and drag this text</SPAN> <TEXTAREA>Select and drag this text</TEXTAREA>
2
2948
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 image in the div tag it works not correctly. Here is my Code... I integrated three pictures and one text, then you can see the differences.
10
6778
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 from Netscape. IE is ok but the Netscape browser including Firefox and Safari are not working now. Not sure why. The idea is that when you mouseover the arrows the gallery div moves to left and right. I have changed the script and now the image...
0
9595
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9873
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8891
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.