SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
-
Jul 31, 2002, 14:59 #1
- Join Date
- Jul 2002
- Location
- North America
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No Left or Right Drag and Drop Shortcut - Help Please!
Hello guys!! I'm new in this forum!
I'm working on putting togheter my website, and I want that people who are visiting my website to not be able to right-left drag (and drop) and make shortcuts of the links I have on my website on their desktop or anywhere else on their computer.
I only want them to be able to add the website to favourites, if they want that, thru the normal procedure, using the menu (Favourites->Add To Favourires).
Does anyone one knows how I can do that? Can you please helme with this?
Thank You Very Much!Duras Ðìámäx
-
Aug 1, 2002, 01:08 #2
- Join Date
- Feb 2002
- Location
- Gatwick, UK
- Posts
- 1,206
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You could try ondragstart="return false;" for the elements
Flawless---=| If you're going to buy a pet - get a Shetland Giraffe |=---
-
Aug 1, 2002, 11:13 #3
- Join Date
- Jul 2002
- Location
- North America
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank You Very Very Much Flawless_Koder!!
I knew is something with "ondragstart" but I was doing it all wrong, I was putting that into the body tag thinking that I can apply it to all the elements at once.
What I was doing was:
<Body bgcolor="black" ondragstart="false">
As you can see I was actually very wrong the way I was doing it. I guess it cannot be applied to all the links in the page at once, but that is not problem at all.
If I understand it correctly what I want it should look something like this:
<a href="http://www.mywebpage.com" ondragstart="return false;">
<font color=red>Click Here</font></a>
I have to ask you one more favour about this, if you don't mind.
Do you know how that can be done to work in Netscape too?
About the attribute that i have to use to work in Netscape I have not even a vague idea.
Again Thank You a Lot!!
I really appreciate your answer!!Duras Ðìámäx
-
Aug 1, 2002, 11:38 #4
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why on earth do you want to stop people doing that? As a general rule, if you ever find yourself wanting to limit what users can do when theyt are on your site you should stop, hit yourself over the head with something solid and get on with creating sites that reward your visitors rather than driving them away.
ondragstart is an IE only event and wouldn't work for users of non-IE browsers (like myself) anyway.
-
Aug 1, 2002, 12:02 #5
- Join Date
- Jul 2002
- Location
- Penns Woods
- Posts
- 44
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why on earth do you want to stop people doing that? As a general rule, if you ever find yourself wanting to limit what users can do when theyt are on your site you should stop, hit yourself over the head with something solid and get on with creating sites that reward your visitors rather than driving them away.let's see, got anything solid laying around...
If you want some serious inspiration, don't stop until you see stars//PS! My brain just hit a bad sector...
-
Aug 1, 2002, 13:04 #6
- Join Date
- Jul 2002
- Location
- North America
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey Skunk!!
How about this?? at school some of the people know about my website, one day we had a project, and one girl took an entire page of my website and put it on her project, after that she went around saying that is her creation, she only changed the pictures, but as she knows almost nothing about html - I don't know much either... but still much more than she knows - she came to me to fix the way those pictures look in the page, saying that she only was inspired by my webpage, she tries to sell ice to the eschimos...
I didn't say anything and I helped her, but of course I didn't like that at all.
And I know that thing doesn't wotk in Netscape, that's why I was asking about how it would be in Netscape.
Cya!Duras Ðìámäx
-
Aug 1, 2002, 13:41 #7
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, since you're already strictly IE, I'd do it like this
Code:<html> <head> <title>Drag Cancelling Text</title> <style> body {font: Arial 12px;} </style> <script language="javascript" type="text/javascript"> function checkObj(trigger) { if (trigger.tagName == 'A' || trigger.parentNode.tagName == 'A') return false return true; } </script> </head> <body onDragStart="return checkObj(event.srcElement)"> <a href="#">Link1</a><br> <a href="#">Link2</a><br> <img src="pic.gif"><br> <a href="#">Link3</a><br> <a href="#"><img src="pic.gif"></a><br> <p>blah blah <a href="#">blah</a> blah blah</p> <a href="#">Link4</a><br> </body> </html>
-
Aug 1, 2002, 16:01 #8
- Join Date
- Jul 2002
- Location
- North America
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank You Beetle!!
Nice to have more than one way of doing things.
I'll try that to see how it goes.
Cya!Duras Ðìámäx
-
Aug 2, 2002, 04:46 #9
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
But the technique you described does absolutely nothing to stop a potential theif from selecting the "save page" option from the browser's edit menu.
As has been discussed on these forums many times before, the only way you can be sure of stopping people from "stealing" your HTML is not to put it on the web in the first place. The same goes for your graphics. That's just a side effect of how the web works.
-
Aug 2, 2002, 05:47 #10
- Join Date
- Jul 2002
- Location
- North America
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hello Skunk!!
No Drag actually helps in combination with scrambling the script is descuraging stealling of the code.
Bye!Duras Ðìámäx
-
Aug 2, 2002, 06:47 #11
- Join Date
- Jul 2002
- Location
- North America
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That actually is becasue I don't want to deny access to viewing the code to all the pages, only to certain pages.
Cya!Duras Ðìámäx
Bookmarks