JavaScript - Problem With Scrolling Up !
Hi evey one
I have a problem with javascript . For example I have a link , something like this :<a href="#" title="" class="rating like" onclick="MakeRequestpos()">hi!</a> When I click on it , the page will scroll up and it's bother me . for example , I scroll the page down and When I click on the link , it'll scroll up . How can I solve it ? thanks Similar TutorialsI need a marquee code that displays images in a continuous vertical cycle.
The tool tip box is way out and off in Chrome browser when I scroll down the page. Please check, download and go through this html file link - http://www.alparin.com/webtest/ixbrl_output2.htm and see what's wrong in the stylesheet/javascript code. I am just so desperate of moving forward with this issue still hanging in the air. Many thanks in advance for help and assistance! Hi there, I was wondering of there is any way to have a browser window scroll down when your mouse reaches the bottom of the page? Any help would be much appreciated, Thanks Hi, I'm looking to create a div which contains a list of news items which can be vertically scrolled through by hovering near the top or the bottom of the div. It will then automatically start scrolling through the content. The nearer to the bottom of the div they position their mouse, the faster the scrolling is. Is this something which is possible, and if so how can I do this? Thanks Curt +++ is it possible to scroll / jump to say, 10px above a div? i tried adding padding, but it doesn't work. also, when I use <a href="#xxxx">, is it possible to prevent the browser from adding #xxxx to the url in the browser? thanks!!! +++ Hello. I am in the process of making a basic game board using javascript. Just a table with a bunch of cells that are blank, soon to be colored. However, what I want to do is create my board and be able to scroll depending on where the mouse cursor is. For example, if it is 100px away from the right side of the screen, then move the board to the right. I am trying to use the information from: here I can't seem to get it to work. I have checked firebug, set and checked breakpoints, but it never moves and I am not sure why. Could anyone please help? Thank you. Heres my code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style> #land { table-layout: fixed; width: 2500px; height: 2500px; } #land td { width: 25px; height: 25px; border: 1px solid black; empty-cells:show; } #land tr { height: 25px; } </style> <script type="text/javascript" src="World/world.js"></script> <script type="text/javascript" src="mapscrolling.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body id="mainBody"> <div id="mainDiv"> </div> <script type="text/javascript" > new CursorDivScroll( 'mainDiv', 20, 20 ); // HERES THE REFERENCE! var i, j; body = document.getElementById("mainDiv"); land = document.createElement("table"); land.setAttribute("id", "land"); land.setAttribute("cellspacing", "0"); land.style.border = "1"; for(i = 0; i < 100; ++i) { var row = document.createElement("tr"); for(j = 0; j < 100; ++j) { var cell = document.createElement("td"); cell.appendChild(document.createElement("div")) // tried &nsbd; but didn't work row.appendChild(cell); } land.appendChild(row); } body.appendChild(land); </script> </body> </html> I need help adding an auto scrolling feature (such as this http://www.brownielocks.com/autoscroll1.html) to an object on my website (see www.mymcgillmisa.com) I've tried (with no results) to get it to scroll, but maybe some experienced coders can help Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><title></title></head><body><div style="width:320px; height:360px; overflow:auto;"> <p style="font: 13pt/20pt Garamond, Georgia, serif;color:#191919;"> <b> NEWS AND ANNOUNCEMENTS</b> </p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> <b>WELCOME BACK </b></p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> MISA has big plans for you this year, so stay tuned and check back here often. We plan on keeping you as up to date as possible with events relevant to you this year.</p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> <b>MISA Rep Selection 09</b></p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> <b>3</b> representatives will be chosen by the executive council for each year (U1, U2, & U3) , if you are interested in applying please check your McGill e-mail or <a href="http://www.sendspace.com/file/60yyn4">click here</a> for information.</p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> <b>Intramural Sports Teams</b></p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> The possible teams a Basketball, Ball Hockey, Dodgeball, Flag Football, Ice Hockey, Outdoor Soccer, Ultimate, & Volleyball. Teams will be formed based on the number of people interested. Please send an email from your McGill email to <a href="mailto:mimmsports@gmail.com">mimmsports@gmail.com</a> with a subject header of the sport (s) you wish to play. All requests must be sent in by Friday September 11th to be considered.</p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> <b>ROYAL FLUSH:</b></p> <p style="color:#191919; font-style:normal; font-variant:normal; line-height:20pt; font-size:13pt; font-family:Garamond, Georgia, serif"> Casino night fundraiser for the Crohn's and Colitis Foundation of Canada at Suco on St-Laurent on <b>Sept 11 @ 9PM </b> feat. DJ Alexei Sopin, Burlesque and Sexy Bollywood dancers, poker, blackjack, roulette, and prizes! Cocktail Dress Code. <a href="http://www.royalflush.yolasite.com">www.royalflush.yolasite.com</a> (20$)</p> </div></body></html> Any help would be appreciated thanks I am creating a testimonials page on a customers site, and I am wanting it to be like a scrolling content. I have the border created, and I want to have text inside the border that will scroll sideways displaying a new one every 10 seconds or so, but having the ability to move between the content. Can anyone tell me what sort of script I should use? I've seen something like it before, but I've had a mind blank. I know it's some kind of Java scripting. Any ideas? Thanks in advance I am looking to have a panoramic image used as the background webpage scroll automatically while the page is open. I do not want the user to have to scroll the image or hover over a div. Is there a way to accomplish this in JS?
Hi, I have the following scrolling table where I do not want the table headers to scroll. I want only the data inside <td></td> to scroll. For some reason that is not happening. Can someone help ? Really appreciate that. Regards, sbguy [CODE] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Page</title> <script type="text/javascript"> var div, scrollTop, scrollID, direction, imgDirection, scrollID1; window.onload = function() { div1 = document.getElementById("div1"); scrollTop = div1.scrollTop; }; function scrollOnImage() { if (imgDirection ==1 ) { if (scrollTop != 0) scrollTop--; } else if (imgDirection == 2) { if (scrollTop != (div1.scrollHeight - 300)) scrollTop++; } div1.scrollTop = scrollTop; scrollID1 = setTimeout("scrollOnImage()", 10); } </script> </head> <body> <br /> <div style="border: solid 1px red; float: left; height:300px; max-height:300px; width:200px; overflow: hidden;" > <table> <tr> <th style="height:20px;"><input type="image" src="images/LGbtn_off.png" alt="img1" onMouseOut="clearTimeout(scrollID1)" onMouseOver="imgDirection=1; scrollOnImage()" /></th> <th>1A</th> <th ><input type="image" src="images/RRbtn_off.png" alt="img2" onMouseOut="clearTimeout(scrollID1)" onMouseOver="imgDirection=2; scrollOnImage()" /></th> </tr> <tr> <td colspan="3" style="height:280px; max-height:280px;"> <div id="div1"> <ul id="ulR_1A" class="ulli"> <li><span class="li_head">PCode:</span> 1234</li> <li><span class="li_head">Product:</span> GX12x24 Medium Large 80</li> <li><span class="li_head">Qty:</span> 256</li> <li><span class="li_head">Batch No:</span> 01AC950</li> <li><span class="li_head">Manf Date:</span> 11/08/2012</li> <li><span class="li_head">SS Date:</span>11/07/2013</li> <li><span class="li_head">Total Pals:</span> 60</li> <li><span class="li_head">Pals Occupied:</span> 59</li> <li><span class="li_head">Bin Occupancy:</span> 89%</li> <li><span class="li_head">Trn No:</span> 1234567890</li> <li><span class="li_head">Bin Status:</span> Part Full</li> </ul> <ul id="ulR_1A" class="ulli"> <li><span class="li_head">PCode:</span> 1235</li> <li><span class="li_head">Product:</span> GX12x24 Medium Large 80</li> <li><span class="li_head">Qty:</span> 256</li> <li><span class="li_head">Batch No:</span> 01AC950</li> <li><span class="li_head">Manf Date:</span> 11/08/2012</li> <li><span class="li_head">SS Date:</span>11/07/2013</li> <li><span class="li_head">Total Pals:</span> 60</li> <li><span class="li_head">Pals Occupied:</span> 59</li> <li><span class="li_head">Bin Occupancy:</span> 89%</li> <li><span class="li_head">Trn No:</span> 1234567890</li> <li><span class="li_head">Bin Status:</span> Part Full</li> </ul> <ul id="ulR_1A" class="ulli"> <li><span class="li_head">PCode:</span> 1236</li> <li><span class="li_head">Product:</span> GX12x24 Medium Large 80</li> <li><span class="li_head">Qty:</span> 256</li> <li><span class="li_head">Batch No:</span> 01AC950</li> <li><span class="li_head">Manf Date:</span> 11/08/2012</li> <li><span class="li_head">SS Date:</span>11/07/2013</li> <li><span class="li_head">Total Pals:</span> 60</li> <li><span class="li_head">Pals Occupied:</span> 59</li> <li><span class="li_head">Bin Occupancy:</span> 89%</li> <li><span class="li_head">Trn No:</span> 1234567890</li> <li><span class="li_head">Bin Status:</span> Part Full</li> </ul> </div> </td> </tr> </table> </div> <div style="border: solid 1px red; float: left"> <img src="http://www.easyvoyage.co.uk/base/imgs/default/esv/meh/upDownArrow.png" onMouseOut="clearTimeout(scrollID1)" onMouseOver="imgDirection=1; scrollOnImage()" /><br /><br /> <img src="http://www.easyvoyage.co.uk/base/imgs/default/esv/meh/downUpArrow.png" onMouseOut="clearTimeout(scrollID1)" onMouseOver="imgDirection=2; scrollOnImage()" /> </div> </body> </html> [CODE] This is my first javascript code ever and I need a bit of help. :[ Also, forgive the goofy styling for the nested divs; I couldn't figure out how to get them to align horizontally without wrapping =\. Essentially, I want the links to gradually scroll the containing div to the specified element's position. I wrote this in a roundabout manner for the sake of learning but I'll clean it up once I can get the function to work which... simply will not. Help? Code: <html> <head><title></title> <script type="text/javascript" src="http://kwonnie.comxa.com/js/jquery-1.2.6.min.js"></script> <script type="text/javascript"> var i = scroll_clipper.pageXOffset; function moveToGreen() { while (i<slide2.offsetLeft) { i++; scroll_clipper.pageXOffset++; setTimeout('moveToGreen()',100); } } </script> </head> <body> <a href="javascript:moveToGreen()">Green</a> <div style="width: 600px; height: 250px; overflow-y: hidden; overflow-x: hidden;" id="scroll_clipper"> <div style="width: 600px; height: 250px; background: red; float: left;" id="slide1"></div> <div style="width: 600px; height: 250px; background: green; float: left; position: relative; top: -250px; left: 600px;" id="slide2"></div> </div> </body> </html> hey guys i have graphic on the right side of the screen that is not in view and i am scrolling it to the left. Is there away to remove the bottom scrollbar permanently through using a mask or something. if i have an item scrolling from the left the scroll bar does not show, but on the right it does. an help be appreciated. This is what i need to do: I have a single <DIV> </DIV> for rendering dynamic HTML content. it already has a scrollbar in it when it overflows with text. I want to be able to prevent the user from selecting text on the DIV, and at the same time, when they click on the DIV and drag the mouse up or down , the HTML document will be scrolled proportionally to the dragging. i would also like to Hide the Scrollbar (not disable it). any suggestions? Hi! I'm trying to build a menu that works just like this one: http://deluxe-menu.com/ajax-technology-menu-sample.html The menu automatically scrolls when the menu doesn't fit the browser window. How is a menu that works like this built? Is there any free demos/examples? Thanks in advance! Can anyone tell me Got any javascript that can support the effect of following link http://www.markinns.com/articles/ful...uee_on_twitter but i want vertical text ...this link is for holizontal I dont wnat to use marquee, because got limitation hey, basically, on my blog i have a "load more" button at the bottom which works great. it uses AJAX to pull in the additional content. now, i want to keep that button, but I also want it to automatically load this content when you scroll to the bottom of the page (endless scrolling - like you see on a lot of sites). so far this is my code. I'm really knew to jquery so I'm sure the problem is obvious to you guys, but please be kind haha. #article_wrapper contains all the blog posts. #loaded contains the new ones that are loaded in with AJAX. #older_posts is the load more button. #load_more is a div around the load more button. thanks! Code: $(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){ $('#articles_wrapper').append("<div class='loaded'></div>"); $('div.loaded:last').load(url); var last = $('div.loaded:last ul'); if (last.is(':empty')) { $('#older_posts').remove(); } url="/ajax/content_load.php" + $('#older_posts').attr('href') + " #load_more"; $('#older_posts').load(url); return false; } }); Hi, I know that iframes can be set to have scroll bars automatically apear when needed or put them there permanantly. However, I would like to have a Javascript slider on the topmost page scroll the iframe. It was possible to make a link on the topmost page change the content of the iframe by putting the iframe name in the link's target. Is this possible with a slider? I ask this because some of the content inside the iframe is on external pages so obviously we can't add the scroll bar there. Right so I have a popup window that when opened in any browser expect of course IE will open perfectly in the centre of the screen. However with IE it decides to jump to the top of the page, then is pushed back down to just show the popup at the bottom of the window. Anyone got any idea how I can stop this? Using IE8. Code: function openPopup_JD(params){ var name = params.name; var blanket = params.blanket || true; var effect = params.effect || "fade" var afterOpen = params.afterOpen || ""; var width = document.getElementById(name).style.width; var height = document.getElementById(name).style.height; width = width.slice(0, -2); height = height.slice(0, -2); width = width * 1; height = height * 1; document.getElementById(name).style.left = getLeft_JD(width) + "px"; document.getElementById(name).style.top = getTop_JD(height) + "px"; //Create blanket if it doesn't already exist. if(!document.getElementById('blanket')){ var popupBlanket = document.createElement("div"); popupBlanket.id = 'blanket'; popupBlanket.style.display = "none"; popupBlanket.style.opacity = 0; popupBlanket.style.filter = 'alpha(opacity = 0)'; popupBlanket.style.backgroundColor = "#000"; popupBlanket.style.position = "absolute"; popupBlanket.style.zIndex = 9998; popupBlanket.style.top = "0px"; popupBlanket.style.left = "0px"; popupBlanket.style.width = "100%"; popupBlanket.style.height = getBlanketHeight()+"px"; document.body.appendChild(popupBlanket); } switch(effect){ //----------------------------------- //FADE IN //----------------------------------- case "fade": if(blanket == true){ animate_JD({ objects: 'blanket |'+name, properties: "opacity |opacity", start: "0", end: "0.75 |1", inerval: "20 |20", frames: "15 |20", effect: "SFS", wait: "0 |-1", onStart: "toggle('blanket') |toggle('"+name+"')", onComplete: " |"+afterOpen }); }else{ animate_JD({ objects: ''+name, properties: "opacity", start: "0", end: "1", interval: "20", frames: "6", effect: "SFS", wait: "0", onStart: "toggle('"+name+"')", onComplete: ""+afterOpen }); } break; Not all of the function is shown because below this are only other effects Hi Guys, I've been progressing along ok onthe CSS side of things but am having some trouble on the javascript side of things. I've decided to jazz a site up with a scrolling gallery from a template i'm using but unfortunately I don't know how to get the main image to change on a click of the smaller one? can anybody please help a brother out! here's the site template - http://dev.jeffking.co.uk/index.html All i'm after is the big main image to change to the same (larger) image of the smaller one in the scrollbar below the main frame. Many thanks! I forgot how to do this. I did this a long time ago but have deleted the example. I want to absolute position 11 scrolling div tags of the same dimensions with the same top and left positions. In other words, on top of each other. This is easy. What I can't remember how to do is trigger them so one shows up and the others are hidden. Code: <style> .one { position:absolute; top:200px; left:0px; background:skyblue; width:250px; height:250px; } .two { position:absolute; top:200px; left:0px; background:aqua; width:250px; height:250px; } </style> <input type="button" onClick="" value="one"> <input type="button" onClick="" value="two"> <div class="one">one</div> <div class="two">two</div> |