Ajax: 99 favorites development experience (2) move the mouse

Source: Internet
Author: User
I must raise this question: plum blossom Snow !!!!!
There is a saying that "there is no difficulty in the world, as long as you have a heart ",
What I want to say is: "JS is not difficult, as long as plum blossom comes ".
To achieve the same functions as IE favorites, you must be able to drag the IE favorites without refreshing them.
On some sites, I can see that if a user sorts out their favorites, the problem will come. You have to wait for half a day !!
So I have to implement the drag of the label on the page, first of all, my Code Testing in IE is completely normal,
In Firefox, if you drag him to ignore you, you can't find any reason. I want to help you solve the problem easily,
I was dizzy. At first glance, I didn't correctly understand the cross-browser JS Code about the location !!
Dizzy, but actually, the problem is pulled again. The next drag in Firefox remains unchanged! He is so stubborn, every way,
I had to try changing the label to be dragged into Div, span, TD .... Oh, my God! All are normal!
I changed it to a again, but I couldn't. I changed it for a long time. Once I forgot to write the href OF THE a tag. Oh, my God, Drag it.
Pull !! This is a strange thing !! Well, it seems that lazy sometimes is also a good thing, so my a tag has no href
Attribute. Another problem is that the user's cookies are saved. After about a month, the user cannot be saved on the client.
The cookie information is too long for the browser to be shut down. Later, I tried to teach n senior people and wrote countless correct codes. in config, <membership defaultprovider = "plprovider" userisonlinetimewindow = "30"> here, it is changed to 30. It turns out to be 15, which is the same as the cookie timeout time. This is a strange thing, some minor issues
Why have I been suffering for so long?
Below is the code for dragging the mouse: There is a function in it that I did not copy up, while dragging is still good in IE, because he can
Set event capture for a single object, but Firefox does not.

var beginmoving = false;
var FF = Window. Navigator. appname = "Netscape "? True: false;
var ie4 = Document. All? True: false;
var dragclickx, dragclicky;
var beginopen = true;
var sourceobj = NULL;
var objectobj = NULL;
var sourceobjid;
function mousedowntomove (OBJ, e)
{< br> sourceobj = NULL;
objectobj = NULL;
beginopen = true;
E = E | window. event;
beginmoving = true;
sourceobj = OBJ;
sourceobj. style. zindex = 1;
dragclicky = E. clienty;
dragclickx = E. clientx;
If (ie4)
{< br> sourceobj. setcapture ();
}< br> If (FF)
{< br> document. captureevents (event. mousedown | event. mousemove | event. mouseup | event. mouseover);
}< BR >}

Function mousemovetomove (E)
{
Beginopen = false;
If (beginmoving! = True) return false;
If (sourceobj = NULL) return;
E = E | window. event;
VaR x = E. clientx-dragclickx;
Var y = E. clienty-dragclicky;
Sourceobj. style. Left = x + "PX ";
Sourceobj. style. Top = Y + "PX ";
}
Function mouseuptomove (E)
{
If (sourceobj = NULL) return;
If (ie4)
{
Sourceobj. releasecapture ();
}
Sourceobj. style. zindex = 0;
Sourceobj. style. Top = 0;
Sourceobj. style. Left = 0;
Beginmoving = false;
Window. setTimeout ("insertswapnode ()", 20 );
}

Function mouseovertomove (E)
{
If (sourceobj = NULL) return;
E = E | window. event;
Objectobj = E. srcelement | e.tar get;
}

The following is the advertising time (why do you always want to advertise -_-)
99 favorites, your personal homepage, is entirely up to you! It is a website that integrates personalized navigation, online favorites, and online news reading. You can modify and configure your navigation page at will. You can add it to your favorites when you browse any page, you can read, configure your favorite news channels, and drag your favorite news to your favorites for permanent favorites! You can browse and search for other people's shared favorites. Similarly, you just need to hold the mouse and drag it to add it to your online 99 favorites forever! All Ajax technologies on this site are implemented. You don't have to wait for a long time to complete all the operations in an instant!
If you want to right-click "favorites to 99 favorites" to permanently add this page to your favorites when Browsing any site, click "Download ins" in the upper-right corner of the site to download the regthis.rar file, in the pop-up dialog box, click "save", select a place for storage, decompress the download, and double-click to run regthis. reg file, and then restart your IE browser, which is very simple, after you browse any page, you can right-click "favorites to 99 favorites" on the page to permanently generate your "99 favorites ".
This site backs up data every day to ensure that your data will not be lost! IE favorites can only be used on a computer, and if the system crashes, the content you add to your favorites in IE favorites will disappear, but "99 favorites" is different, data is stored on our servers, and you can use it on any computer that can access the Internet! You can also import content from your IE favorites to "99 favorites" online ".
About your favorites: If you have logged on, the names of your favorites are listed under "My favorites" on the left. "root directory favorites" indicates a collection without category, if you click any favorites, the favorites in the favorites will be immediately displayed. You can also right-click a favorites and modify it in the pop-up context menu. you can also right-click a favorite and modify it in the pop-up menu. you can also directly drag your favorites to change their positions, or directly drag a favorite from a folder to another favorites.
About user navigation templates: first, please log in, and then you can click "preview template". You can preview the templates you have prepared on this site, which will not change your navigation template, or "insert template", insert the template you selected before your existing template, or "Change template ", you can use the template you selected to change your existing template. if you only want to change a link in a template, right-click the link and change it to what you need in the pop-up dialog box!
About your news channel: After you log in, you can see the news channel you subscribed to on the right. Click them to display your favorite news, and right-click to add a news channel, when reading news, you can drag your favorite news to your favorites permanently. Everything is as simple as this. you can also add your news channel by clicking a category under the RSS news channel on the left. In the pop-up panel, right-click a news channel if you like it, right-click the pop-up menu and select "set as my news channel!
About searching and sharing collections: You can search for a user's favorites by user name, by title, or by link address, in the search results, you can drag your favorite favorites to your favorites permanently. You can also drag the shared favorites to your favorites at will, you only need to log on to everything!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.