HTML - Dragabal Links - Shift/double Click/more Layers?
Short Sersion:
What the best way to make a link dragabal but not clickable while being dragged? Long Version: I have a bunch of icons links (in layers) that the visitor can drag over the screen and even remove if they want to. (it's totally cosmetic, and everything is reset as soon as the page is refreshed, but it ads a level of detail - hence why am doing it) Since this is an unnecessary function it cannot interfere with the visitor’s ability to use the site smoothly. Therefore my issue; Since the links are dragabal, as soon as you click the link to drag it does what a link does and loads the page (after you release/drop it) Fix 1. The Shift. The quickest fix is to set the top margin of the button to the height of the image of the button. This way when you click it the button is shifted down and the handle becomes the area above the button, this way you can’t click the button while dragging. This does somewhat kill the effects, it looks a little odd when you go to click and drag the link and suddenly the links shifts down and you are holding the empty space above it. But it does solve the problem very simply and there for should be considered. Fix 2. The DblClick This is even a simpler fix to fix1 but it could interfere with the usability of the site… Setting the link to activate on a double click instead of a single click. This way the click to drag the button doesn’t activate the link. http://www.htmlforums.com/showthread.php?t=84281 Fix 3. “Block Layer” Another thought is to show a hidden layer when the drag function is activated this will block the link from being clicked. The “block’ layer can be hid again once the button is dropped, or in my case since I am already using the on drop event and have “only when snapped” checked, set the “block” layer to hide on mouse out, and assign a onclick link to the “block’ layer as well, incase the visitor tries to click the link after dragging it without mouseing off it first. This as far as I can see is the best compromise, however it adds a lot of additional code and mouse events that could effect the performance of the page. The best fix would be to disable the onclick event while dragging but I am not sure how to do that, and if you even can. Additionally I would assume that if disabled, the onclick event would need to be enabled after dragging, and since I am already using the on drop/ when dropped event and have “only when snapped” checked that could pose a problem. Any thoughts? Similar TutorialsHey all, It's very embarrassing to have to ask a question like this on a web coding forum when the site I'm having trouble with is centered around web design...but you gotta do what you gotta do. My excuse is my general lack of experience with IE's quirks. My problem is simple - hopefully the fix is, too. When my website (http://www.infusiondesign.org) is loaded in internet explorer, sometimes the "content" div is centered, as it should be - and sometimes it isn't. When it is centered, hovering over a link generally causes the div to align:left, and it won't center again until you refresh the page. The issue is hard to describe, but it's self-explanatory if yuo visit the page. I'm baffled - my pages are almost valid XHTML, and they work well in Firefox. Is this some sort of strange quirk with IE, or am I totally incompetent? Thanks in advance for any assistance. Hi I have site it has windows media player embeded in it, it plays some live stream, I want page to load than stream to load it take about 5 seconds to load, I want html code to double click on windows media player so it will be full screen automatically without user doing it. Please help me Thank you. Hi, I had a previous post but have changed teh way teh links are styled so thought it need a new subjest to solve a different problem. The links in teh bottom left column appear nicely in IE but have double line spacing in FF Here is the link www.creativecogs.com/new Here is the CSS style for the links in questions Code: .links { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; font-weight:bold; text-decoration:underline; color:#6ba033; } and the HTML Code: <p><span class="links"><a href="#" class="links">Web Design Somerset</a><br> <a href="#" class="links">Web Design Dorset</a><br> <a href="#" class="links">Web Design Devon</a><br> <a href="#" class="links">Web Design Yeovil</a><br> <a href="#" class="links">Web Design Taunton</a><br> <a href="#" class="links">Web Design Bath</a><br> <a href="#" class="links">Web Design Bridgewater</a></span></p> Any ideas how to stop the double line spacing in FF? I have tried using ul and li tags but i come accross other problems posted in this thread http://www.htmlforums.com/html-xhtml...tml#post596995 A soultion to either one would be appreciated. CC_DESIGN I was wondering if anyone knew what it means when links have that protocol at the end of them, like &Click=3949? My guess is that it is a way to track links to give the link giver credit. Is that right? my website has 2 frames that have to change all the time(main content, and news), so sometimes when I click on one link(from navigation), I want it to call two links for me(one of them changes main content, and one of them changes news). for exampe, how to I call two links from below in one click? <a href="index.php?news=hi">Hi</a> <a href="index.php?news=hello">Hello</a> I tried something like this but it doesn't work : <a href="index.php?news=hi" AND "index.php?news=hello">Hi and Hello</a> I also notice there is a way to use "Onclick" function to solve the similar problem, but it does not fit in my code. Please, help me if u know the answer. thank you Is there any way to have one hyperlink change to another once it is clicked? And I want it to change to the link of the page of the member who clicked it. Also, I want it to not change if a someone who isn't a member clicks it. Hi, I have a text link, when a user clicks it, I want multiple URLs to open in a new tab/window. I guess it's a javascript solution, yea? After searching the net for 30 mins I can't find anything. Thx in adv hi all, One strange issue with html <a> tags.We have XP English and Japanese machines and issue is getting only in XP Japanese machines. Issue is tat on clicking any link,link font size gets increased and its comes over other links.Its like a new layer of big font sized links over the old links. Any idea why this happens? Following is my JSP section ============================= <div onselectstart="return false" id="systemMenu" style="position:absolute;top:-75px; left:-20px; "> <label>Screen # : </label> <input tabindex="1" suggest_sel_event="selectScreenIdValue" type="text" title="Provide screenId and Hit Enter key" id="screenIdEntry" name="screenIdEntry"/> <button tabindex="-1" id="SUGGEST_screenIdEntry" onclick="suggestScreenIds()"></button> | <a tabindex="2" href="javascript:selMenu('showHomePage.do','PARENT','')">Home</a> | <a tabindex="3" href="javascript:doHelpFunc()" onmouseover="">Help</a> | <a tabindex="4" href="javascript:aboutiCargo('<%=mainWebBuildVersion%>')" onmouseover="">About</a> | <a tabindex="5" accesskey="o" href="javascript:exitlogOffIcargo(ctxPath+'/logout.do','logOffApp')">Lo<u>g</u>off</a> | <a tabindex="6" accesskey="x" href="javascript:exitlogOffIcargo(ctxPath+'/logout.do','exitApp')" >E<u>x</u>it</a> </div> =================================================== CSS Used In the page ===================== <STYLE> body{ margin:-1px; scrollbar-base-color: #C6CEDE; scrollbar-arrow-color: #000000; scrollbar-track-color: #C6CEDE; scrollbar-face-color: #C4CED9; scrollbar-highlight-color: #C6CEDE; scrollbar-shadow-color: #C6CEDE; scrollbar-3dlight-color: #000000; scrollbar-darkshadow-color: #000000; } #footer{ position:absolute; left:1%; top:99%; width:97%; text-align:center; font-size : 8pt;font-family : Arial,Verdana,Sans-Serif; /*font:menu;*/ color : #000000; /*background-color:#CCCCCC; */ } .footer{ text-align:center; font-size : 8pt;font-family : Arial,Verdana,Sans-Serif; /*font:menu;*/ /*background-color:#CCCCCC; */ } div.footer table{ border-collapse:collapse; padding:0px; word-spacing : 0px; width: 99%; /*100% of container produces horiz. scroll in Mozilla*/ border: 0px; } div#systemMenu{ color:#ffffff; font-weight:bold; } div#systemMenu button{ border-collapse:collapse; color:#ffffff; font-weight:bold; font-size:12px; border: 0px none; background-color:1F3E6C; width:0px; height:0px; } div#systemMenu input{ /*font-family : Arial,Verdana,Sans-Serif; font-size : 8pt;*/ font:menu; width : 75px; height : 15px; color : #000000; text-transform : uppercase; background : #ffffff; border-right-width : 0px; border-bottom-width : 0px; border-left-width : 0px; border-top-width : 0px; border-top-style : none; border-left-style : none; border-right-style : none; border-bottom-style : none; border-collapse:collapse; } div#systemMenu label{ border-collapse:collapse; color:#ffffff; border: 0px none; background-color:1F3E6C; text-decoration : none; /*font-weight:bold; font-size:12px;*/ /*font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;*/ font:menu; } div#systemMenu a{ border-collapse:collapse; color:#ffffff; border: 0px none; background-color:1F3E6C; text-decoration : none; /*font-weight:bold;font-size:12px;*/ /*font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;*/ font:menu; } div#mainErrorDiv table{ padding:0px; word-spacing : 0px; width: 99%; /*100% of container produces horiz. scroll in Mozilla*/ } /*********************************FONT STYLES********************************/ .iCargoRedText { font-family : Arial,Verdana,Sans-Serif; font-size : 10pt; color : #336666; font-weight : bold; } .iCargoSmallText { font-family : Arial,Verdana,Sans-Serif; font-size : 7pt; color : #000000; } .iCargoPageText { font-family : Arial,Verdana,Sans-Serif; font-size : 10pt; color : #000000; } .iCargoErrorMessage { font-family : Arial,Verdana,Sans-Serif; font-size : 9pt; color : #336666; list-style-position : outside; list-style-type : square; } .iCargoInfoMessage { font-family : Arial,Verdana,Sans-Serif; font-size : 9pt; color : #000000; } div.loadBox { /*font-family: Arial, sans-serif; font-size:9pt;*/ font:menu; color: #FFFFFF; border: 0px none #FF3E3E; background-color: #1F3E6C ; text-align: center; position:absolute; } </STYLE> Can anybody point me in the right direction on how to create this screen shift effect of the background, like in this website. http://www.nikebetterworld.com/ I would be very appreciative of any help you guys could give me. Thanks in advance. Hey All! I am looking for a little help on this. I had a problem with my site (www.darose.ca) where I would change the size of the text and the page 'breaks' (refer to uploaded jpeg). However, I have managed to fix this by restricting CSS to show only a particular font. STILL, the problem persists as when I would test my webpage at http://browsershots.org/ it would show different browsers but still the page is "breaking". The weird thing is everything looks fine in IE !!! I am wondering if this is a simple CSS code...ex having the length and width pushed together as far as it could go (always). Does anybody know a way around this??? Brad http://www.darose.ca How do I vertically move all of the text (ie Days:Hour:Min:Sec) in the 2nd row of the column that says "Test" to the top of the box? How do I vertically move all of the text (ie Days:Hour:Min:Sec) in the 2nd row of the column that says "Best Time since 2005" to the middle of the box? Thank you. <table border="1"> <tr> <th> </th> <th>Test</th> <th style="color:green">Best Time Since 2005</th> </tr> <tr> <th>Comp X</th> <th> <div id="cpcontainer"> <table><tr class='text' align='center'><td>Days :</td><td> Hour :</td><td>Min :</td><td>Sec</td> </tr><tr class=''text'' align=''center'' style='color:green'> <td>11 :</td><td> 5 :</td><td>0 :</td><td>0</td> </tr></table> </div> </th> <th> <div id="cpcontainer1"> <table><tr class='text' align='center'><td>Days :</td><td> Hour :</td><td>Min :</td><td>Sec</td> </tr><tr class=''text'' align=''center'' style='color:green'> <td>11 :</td><td> 5 :</td><td>0 :</td><td>0</td> </tr></table> </div> </th> </tr> </table> My page loads correctly, but when I open a new tab in IE7 so the tab bar appears, my page shifts to the left, and the menu overlaps/ obscures parts of the images. I can't find a reason why this happens, can anyone help? A screenshot of the error can be found below: http://www.onetopsoccer.com/error.jpg The page itself is at http://www.onetopsoccer.com/index.shtml Problem Solved, Thanks everyone Theoretically, a webpage is made up of layers, of which some things can go on top - or bottom - of others. Does anyone here know if it is possible to change the position of them? Thanks hello all.. i am pretty new to web creation, so this question might be pretty studpid.. Anyhow, I am using layers in my website. But everytime i view it on a browser (safari, firefox, ie) they are all over the place... Sometimes its just a small displacement or something.. but the layers just dont stay where i specify them in dreamweaver. I was wondering if anyone would be able to help me fix this problem? or if there is workaround to this.. thanks Hi, if you take a look at the following page: http://www.vub.ac.be/ARCH/reis.php you will see that - in IE - the footer overlaps with the content layer. in FF everything is ok any ideas? thanks Hi all, I have a problem with two layers i want to place on top of an iframe in at table. The website: http://kvc.dk/CTC7/2.htm As you can see its positioned below the iframe. I know it can be done because i have done on this: http://kvc.dk/CTC7/index.htm The problem is that its not working in firefox. Hope you can help. Thanks http://www.zouklambada.com/eventsNew.asp This is the page I'm working on. Basically i need it to work in the following way. When you click on all the images at the moment, it is working fine (sort of)- each time you click, a layer comes up over the three small ones - BUT i need the small images to stay in position and these big images to go ontop (ie. you dont see the small images in that same row - they should not jump to the bottom. There will be more rows. When a big image is displayed in first row, the second row must slip underneath. Hope this makes sense! Please help! I own a website at, www.Catwiskers.co.nr If you look, there are two characters on both sides of the main page. In order to position them there, I used a div position:absolute; script. Also if you notice, there is movement behind them. That's a flash movie I made, but then the movie disappears. But I also used div position:absolute; to place that there as well. How do I get the flash movie to be ONTOP of everything else on the page? Is there some sort of alpha:true or something? |