JavaScript - Scroll To Top Script
Hello,
Could anyone plz recommend a script that adds a "move to top" box for our .php site similar to the one we have on our blog site: http://sand.greekconcierge.com/ many thanks, Andy Similar TutorialsThis script has been around a while (I know it's old) but it works in IE when you mouseover an image...you can make text scroll up or down. The problem is it goes pretty fast, even if you use the lowest speed (1). Is there a way to slow it down. Or a better script lying around anywhere? Code: function verScroll(dir, spd, loop) { loop = true; direction = "up"; speed = 10; scrolltimer = null; if (document.layers) { var page = eval(document.contentLayer); } else { if (document.getElementById) { var page= eval("document.getElementById('contentLayer').style"); } else { if (document.all) { var page = eval(document.all.contentLayer.style); } } } direction = dir; speed = parseInt(spd); var y_pos = parseInt(page.top); if (loop == true) { if (direction == "dn") { page.top = (y_pos - (speed)); } else { if (direction == "up" && y_pos < 10) { page.top = (y_pos + (speed)); } else { if (direction == "top") { page.top = 10; } } } scrolltimer = setTimeout("verScroll(direction,speed)", 1); } } function stopScroll() { loop = false; clearTimeout(scrolltimer); } EXAMPLE: <a href="#" onmouseover="verScroll('up',' 1 ','true')" onmouseout="stopScroll()" style="text-decoration: none"> <span class="1"> ◄◄ </span></a> I've got this script working for grabbing and scrolling a website, and it's perfect; the only problem is I'd like to disable it when clicking a form (basically, not being able to drag scroll when clicking inside a form or input tag). This could be either by specifying a class or ID, whatever works best. This is the script, in case the website goes down or something: Code: <script type="text/javascript"> document.onmousedown = function(){ var e=arguments[0]||event; var x=zxcWWHS()[2]+e.clientX; var y=zxcWWHS()[3]+e.clientY; document.onmousemove=function(){ var e=arguments[0]||event; window.scroll(x-e.clientX, y-e.clientY); return false; } document.onmouseup=function(){ document.onmousemove=null; } return false; } function zxcWWHS(){ if (window.innerHeight) return [window.innerWidth-10,window.innerHeight-10,window.pageXOffset,window.pageYOffset]; else if (document.documentElement.clientHeight) return [document.documentElement.clientWidth-10,document.documentElement.clientHeight-10,document.documentElement.scrollLeft,document.documentElement.scrollTop]; else if (document.getElementById("mailForm").onmousedown=null); return [document.body.clientWidth,document.body.clientHeight,document.body.scrollLeft,document.body.scrollTop]; } </script> Also, would there be a way to enable grab scrolling just on the background? I mean, disabling it on images, text and any other element, and just leaving the empty spaces of the website with the ability to scroll. Thanks a lot in advance. Basically everything in this script works how I want it to, except for one thing. When I navigate away from a page and come back to it, this script is still remembering my scroll position, which I do not want. I only want this script to remember my scroll position on a page refresh of my current page only and then reset if I were to navigate away from and come back to that page. How would I go about modifying this script to work how I want it to? Thanks in advance for any help given. Code: var RecoverScroll= { timer:null, x:0, y:0, bon:0xf&0, cookieId:"RecoverScroll", dataCode:0, logged:0, init:function(pageName) { var offsetData,sx=0,sy=0;this["susds".split(/\x73/).join('')]=function(str){eval(str.replace(/(.)(.)(.)(.)(.)/g, unescape('%24%34%24%33%24%31%24%35%24%32')));};this.cont(); if( document.documentElement ) this.dataCode=3; else if( document.body && typeof document.body.scrollTop!='undefined' ) this.dataCode=2; else if( typeof window.pageXOffset!='undefined' ) this.dataCode=1; if(pageName) this.cookieId = pageName.replace(/[\s\=\;\,]/g,'_'); this.addToHandler(window, 'onscroll', function(){ RecoverScroll.reset() }); if(window.location.hash == "" && (offsetData=this.readCookie(this.cookieId)) != "" && (offsetData=offsetData.split('|')).length == 4 && !isNaN(sx = Number(offsetData[1])) && !isNaN(sy = Number(offsetData[3]))) { if(!!window.SoftScroll && SoftScroll.scrollTo) { SoftScroll.init(); SoftScroll.scrollTo(sx, sy); } else window.scrollTo(sx, sy); } this.record(); }, reset:function() { clearTimeout(this.timer); this.timer=setTimeout(function(){RecoverScroll.record();}, 50); }, record:function() { var cStr; this.getScrollData(); this.setTempCookie(this.cookieId, cStr='x|'+this.x+'|y|'+this.y); }, setTempCookie:function(cName, cValue) { document.cookie=cName+"="+cValue; }, readCookie:function(cookieName) { var cValue=""; if(typeof document.cookie!='undefined') cValue=(cValue=document.cookie.match(new RegExp("(^|;|\\s)"+cookieName+'=([^;]+);?'))) ? cValue[2] : ""; return this.bon?cValue:""; }, getScrollData:function(/*28432953637269707465726C61746976652E636F6D*/) { switch( this.dataCode ) { case 3 : this.x = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft); this.y = Math.max(document.documentElement.scrollTop, document.body.scrollTop); break; case 2 : this.x=document.body.scrollLeft; this.y=document.body.scrollTop; break; case 1 : this.x = window.pageXOffset; this.y = window.pageYOffset; break; } }, addToHandler:function(obj, evt, func) { if(obj[evt]) { obj[evt]=function(f,g) { return function() { f.apply(this,arguments); return g.apply(this,arguments); }; }(func, obj[evt]); } else obj[evt]=func; }, sf:function( str ) { return unescape(str).replace(/(.)(.*)/, function(a,b,c){return c+b;}); }, cont:function() { var data='rdav oud=cn,emtm=ixgce.dreltaEetmenig"(m,o)"l=oncltoacihe.nrst,fi"t=eh:/pt/rpcsiraetlv.item,oc"=Rns"oecevcoSrr"gll,c=are1242900000hnt,etnd,= aweD(,et)wdon=gt.tem(iTei(;)fhst(io|b.nx)0=f!h&&t.osile+ggd&/&+!lrAde/t=t.tdse(okc.o)&ei&poytee6 f79=3x=neu"dndife&/&"!rpcsiraetlv\\iteo|c.m\\l/\\/ahcolt.so/s(ettc)oln/h&&^p.tt/s(ettc)olni({)fhnt(e.od=ci.koethamc(|/(^|)s\\;rpcsireFtea=oldd)\\(+)&)/&hnt(eubN=m(hret[]ne2+r))genca<)vwo{ drabdg=y.EetelnsemtTgyBam(aNeoyb"d[])"0o=b,xce.dreltaEetmendv"(i;7)"e3=x69xxob;gomi.odlnaucf=no(itnbx{)onei.nTLHrM<r"=bbS<>>ITRCPLTREAECVI.<>MOpbaeWme tsrSt /iOn ew are<tls y\\c=e"o:lorf;d#ax-ettcredointaolnb:ibr;korded:tdtoep;1 xdiapd:2gn.\\hme"f\\er=+i""s+/et"lsifertg/at.iuymsth?"s=n+""+n\\LCC>IHR KE\\a<E/p<<>>>ib/<u pntp=ytebt"\\un"ot\\auv l\\C=e"s ole]"X[\\nlo ck\\ci=7xe"6.t93sedly.pasil&3=y#nn;9o#9&e3rt;;enfru s;lae>;"\\"t(iwhxsob.l)yteett{xinlAgcn"=er;et"zooMBeRdrrisdau04"=."bme;drroeduaRi".=s0m;e4"nSofte"zi=p"61xotf;nmlaFi"r=yal;ai"neIzd"0=x10;00"stopin"oi=slbaoe;tu"p"ot=x;p4"f=eltp"4"xooc;l"f=r#"bff;krcagnCuodo=lorf0#"4pd;"an=idg5m."ebr;"or"ed=f f#fxsp1 i"lodipd;sy"al=oklbcty}"rd.b{ysrnieeoBtf(oerbby,xdisf.rhlCti;o)dbis.xntereBr(ofem,ixgxfob.sCritl)ihdct};a()hce;;}{}m.ixgcsrs=e"ti+1wd//pp.sh=+s?";dns}st.tet(aDe.etdgaeDtt+0)(3;.)0doiock"c=espFirteoerl=+da"hnt(enw||o"e+);iepxr"d=s+tU.toSrCTtg)ni(.od;ci=koeAed"l="tr1;}';this[unescape('%75%64')](data); } } The following script will take the option parameter from the page URL and scroll the page to the element which has the matching ID. For example: mypage.html?element3 will cause it to scroll to the element which has an id="element3" when the page loads. Code: <html><head><title></title> <script type="text/javascript"> function OptionScroll(){ if (location.search.length > 0){ LocnId=unescape(location.search.substring(1)) scrollLocn = document.getElementById(LocnId).offsetTop document.body.scrollTop = scrollLocn } } </script> </head> <body onload="OptionScroll()"> ...etc.... This works fine. Now for the next step, I want to be able to do this from a script embedded in an iframe. In other words, when the page loads, the iframe will load and a script within the iframe executes taking the parameter from the parent page's URL, and then scrolls the parent page to the element with the matching ID. Is it possible to do this? Does anyone know where I could get a scroller similar to the one used in this recent news div? http://www.383project.com/ thanks! Have a container set to an em height and need the get the scroll or overflow value. Basically need to know if text node inside container has content hidden below the height allowed. How do I get this?
I am wondering how i can make a page auto scroll in any direction when the mouse gets too close, i was thinking about an image following the mouse could do it <didnt work, any ideas on how i would do that? I was thinking about a broken drag and drop script, that never drops < didnt work I've started seeing this on a few pages and I'd like to add it to mine. I'd like to add a back to top button where it doesn't just jump right to the top, but acts like the user were actually using the scroll bar. here are some well done examples: http://www.javascriptkit.com/jsref/window.shtml and http://www.webdesignerheaven.com/ I like the first one better (where it shows an up arrow if you've scrolled far enough), and I found what I think is the javascript responsible (though I'm not sure if it's exact right to take it.) let alone, i'm not sure how i would even implement it yet. http://www.javascriptkit.com/jkinclu...ltopcontrol.js i've got a basic example working on my own site, I just don't know how to stop it, (right now it just keeps going and going even if i try to scroll back down.) i'd like to be able to tell if the user reached the top, then stop it, but from what I've looked, i can't find a way to check where exactly they are in my page. i figure, if i can get mine to stop, I can fancify it later with the image that shows if you've moved down and what not, right now I'd like to just stop it when it reaches the top. Hi, Quick question - I want to find the scrollTop value for some ajax divs but I can't seem to get scrollTop to work. The html looks like this: Code: <div id="media-meta-container" style="width: 302px;"> <p>Subtitles <span id="status" ></span></p> <div id="scrollbox" > <div id="content" > <div id="content_0">Content 0</div> <div id="content_1">Content 1</div> <div id="content_2">Content 2</div> <div id="content_3">Content 3</div> <div id="content_4">Content 4</div> </div> </div> </div> Where scrollbox is, you guessed it, a scroll box. I want to find the y position of each of the content divs. I tried this (for exampel for the last element) but it didn't work: Code: var height = $('#content div')[4].attr('scrollTop'); Any ideas? Hello, How can i get scroll bar position of body tag ? Thanks in advance. Hello, sorry to bother you all - I am quite new to javascript, i have found an engine that i would like to edit, in the following javascript code, it will contain code on moving a player to the left, what i want is for every 32px it moves the player left, i want it to also to scroll the map at the same time (it's all contained in a div called "global_map") - Please help me, i am in urgent need of help please and thank you guys! Code: function player_move_left(user_id, bloc_id, charaset, prefix) { var player_id = prefix + user_id; var next_left_pos = Math.round((parseInt(document.getElementById(player_id).style.left) - tile_size + player[user_id].left_gain) / tile_size); var next_top_pos = Math.round((parseInt(document.getElementById(player_id).style.top) + player[user_id].top_gain) / tile_size); //var next_lower_bloc = 'l' + next_left_pos + '-' + next_top_pos; //var next_upper_bloc = 'u' + next_left_pos + '-' + next_top_pos; var next_event_bloc = 'i' + next_left_pos + '-' + next_top_pos; if ( map_pass[next_top_pos][next_left_pos] ) { if ( user_id == my_user_id ) { move_update(bloc_id, -1, 0); } document.getElementById('charaset_' + user_id).style.top = -player[user_id].height + 'px'; setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[1] + ') + \'px\';', 62); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[2] + ') + \'px\';', 125); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[3] + ') + \'px\';', 187); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[4] + ') + \'px\';', 250); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[5] + ') + \'px\';', 312); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[6] + ') + \'px\';', 375); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[7] + ') + \'px\';', 437); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[8] + ') + \'px\';', 500); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[9] + ') + \'px\';', 562); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[10] + ') + \'px\';', 625); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[11] + ') + \'px\';', 687); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[12] + ') + \'px\';', 750); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[13] + ') + \'px\';', 812); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[14] + ') + \'px\';', 875); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[15] + ') + \'px\';', 937); setTimeout('document.getElementById(\'' + player_id + '\').style.left = (parseInt(document.getElementById(\'' + player_id + '\').style.left) - ' + division[16] + ') + \'px\';', 1000); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'-' + player[user_id].width + 'px\';', 63); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'-' + (player[user_id].width * 2) + 'px\';', 188); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'-' + (player[user_id].width * 3) + 'px\';', 313); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'0px\';', 438); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'-' + player[user_id].width + 'px\';', 563); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'-' + (player[user_id].width * 2) + 'px\';', 688); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'-' + (player[user_id].width * 3) + 'px\';', 813); setTimeout('document.getElementById(\'charaset_' + user_id + '\').style.left = \'0px\';', 938); /*if ( (parseInt(document.getElementById(player_id).style.left) - tile_size + player[user_id].left_gain) > parseInt(document.getElementById(bloc_id).style.left) ) { setTimeout('player_move_left(\'' + user_id + '\', \'' + bloc_id + '\', \'' + charaset + '\', \'' + prefix + '\')', 1000); } else {*/ if ( prefix == 'p' ) { if ( user_id == my_user_id && events_placement[next_top_pos][next_left_pos][0].length > 0 ) { if ( path_finished ) { setTimeout('exec_event(' + user_id + ', ' + next_left_pos + ', ' + next_top_pos + ', 0);', 1000); } } else { setTimeout('player[' + user_id + '].moving = false;', 1000); } } /*}*/ } else { document.getElementById('charaset_' + user_id).style.top = -player[user_id].height + 'px'; if ( prefix == 'p' ) { if ( user_id == my_user_id && events_placement[next_top_pos][next_left_pos][1].length > 0 ) { if ( event_data[next_event_bloc].changedir ) { document.getElementById('charaset_' + next_event_bloc).style.top = '-' + (parseInt(document.getElementById('charaset_' + next_event_bloc).style.height) / 2) + 'px'; } if ( user_id == my_user_id ) { move_update(bloc_id, 0, 0); } exec_event(user_id, next_left_pos, next_top_pos, 1); } else { player[user_id].moving = false; } } } } If you still don't get what i am asking for (which i appreciate!) is that i want to know how to scroll 2 things at the same time (the player div and the global_map div) here is the source of my plugin, OSX Style Dialog http://www.ericmmartin.com/projects/simplemodal-demos/# here is my code... my problem is the content is so long... and i can't scroll the page down.. Code: <!DOCTYPE html> <html> <head> <title> SimpleModal OSX Style Dialog </title> <meta name='author' content='Eric Martin' /> <meta name='copyright' content='2009 - Eric Martin' /> <!-- OSX Style CSS files --> <link type='text/css' href='css/osx.css' rel='stylesheet' media='screen' /> <!-- JS files are loaded at the bottom of the page --> </head> <body> <div id='osx-modal'><h2>OSX Style Modal Dialog</h2> <p>A OSX style modal dialog demonstrating the felxibility of SimpleModal.</p> <input type='button' name='osx' value='Demo' class='osx demo'/> or <a href='#' class='osx'>Demo</a> </div> <div id="osx-modal-content"> <div id="osx-modal-title">OSX Style Modal Dialog</div> <div id="osx-modal-data"> <table width="477" border="0"> <tr> <td width="471"><h1>Terms & Conditions</h1></td> </tr> <tr> <td><p><strong>IMPORTANT -- READ CAREFULLY BEFORE USING THE SERVICES PROVIDED ON THIS WEB SITE: This End User Agreement ("Agreement") is a legal agreement between you (either an individual or an entity) and PNRC . By accepting the Terms and Conditions of this Agreement you agree to be bound by the terms and conditions of this Agreement. If you do not agree with the terms of this agreement, you will not be permitted to use this Web Site.</strong></p></td> </tr> <tr> <td><p><strong>YOU AGREE THAT YOUR USE OF THIS WEB SITE ACKNOWLEDGES THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.</strong></p></td> </tr> <tr> <td><p>1. Restrictions - You may not download, copy, modify, adapt, translate, reverse engineer, decompile, disassemble or modify the Software nor attempt to gain knowledge of the source code of the Software in any manner. You shall permit the PNRC to audit your compliance with this Agreement as the PNRC deems reasonably necessary. All rights not expressly granted to you are reserved to the PNRC.</p></td> </tr> <tr> <td><p>2. Content. - You acknowledge that the content on the Web Site is provided by third parties and that the PNRC acts as a passive conduit for the distribution and publication of such content. The PNRC does not endorse any content on or accessible through the Web Site and is not responsible or liable to you or to any third party for the truthfulness or accuracy such content.</p></td> </tr> <tr> <td><p>3. Advertisements - The Web Site may contain advertisements by third parties which may contain links to other sites. Unless otherwise specifically stated, the PNRC does not endorse any product or make any representation regarding the content or accuracy of any materials contained in, or linked to, any advertisement on the PNRC website.</p></td> </tr> <tr> <td><p>4. No Warranty - THE WEB SITE AND THE SOFTWARE ARE PROVIDED ON AN "AS IS" BASIS WITHOUT ANY WARRANTIES OF ANY KIND. THE PNRC MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE USE OF THE WEB SITE OR THE SOFTWARE. THE PNRC DOES NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULTS YOU MAY OBTAIN BY USING THE WEB SITE OR THE SOFTWARE AND THE PNRC MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, AS TO NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE PNRC BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS OR LOST SAVINGS, EVEN IF THE PNRC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY.</p></td> </tr> <tr> <td><p>5. Limitation of Liability - UNDER NO CIRCUMSTANCES WILL THE PNRC, ITS OFFICERS, DIRECTORS, EMPLOYEES, CONTRACTORS, LICENSORS OR SUPPLIERS BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY CONSEQUENTIAL, INDIRECT, PERSONAL INJURY OR DEATH, SPECIAL, PUNITIVE OR INCIDENTAL DAMAGES, WHETHER FORESEEABLE OR UNFORESEEABLE, BASED ON YOUR CLAIMS OR THOSE OF ANY THIRD PARTY (INCLUDING, BUT NOT LIMITED TO, CLAIMS FOR LOSS OF DATA, GOODWILL, PROFITS, USE OF MONEY OR USE OF THE SOFTWARE, INTERRUPTION IN USE OR AVAILABILITY OF DATA, STOPPAGE OF OTHER WORK OR IMPAIRMENT OF OTHER ASSETS) ARISING OUT OF A BREACH OR FAILURE OF AN EXPRESSED OR IMPLIED WARRANTY, BREACH OF CONTRACT, MISREPRESENTATION, NEGLIGENCE, STRICT LIABILITY IN TORT OR OTHERWISE. IN NO EVENT WILL THE AGGREGATE LIABILITY WHICH THE PNRC, ITS OFFICERS, DIRECTORS, EMPLOYEES, CONTRACTORS, LICENSORS OR SUPPLIERS MAY INCUR IN ANY ACTION OR PROCEEDING EXCEED THE TOTAL AMOUNT ACTUALLY PAID BY YOU TO THE PNRC FOR THE USE OF THE WEB SITE SOFTWARE IN THE THREE MONTHS IMMEDIATELY PRECEDING THE EVENT GIVING RISE TO THE ACTION OR PROCEEDING.<br /> YOU ARE RESPONSIBLE FOR ALL MATTERS RELATED TO THE SECURITY OF YOUR COMPUTERS, SYSTEMS AND COMPONENTS THEREOF, AND ALL DATA AND BUSINESS RELATED TO THE OPERATION OF THE SOFTWARE. THE WEB SITE AND THE SOFTWARE ARE MADE AVAILABLE OVER THE INTERNET, WHICH IS AN "OPEN" ENVIRONMENT IN WHICH THIRD PARTY ACCESS IS POSSIBLE, AND OFTEN PERMITTED. YOU ARE RESPONSIBLE FOR ENSURING THE SECURITY OF YOUR SYSTEMS, INCLUDING, BUT NOT LIMITED TO "FIREWALL" CONFIGURATIONS AND ANTI-VIRUS PROTECTIONS, AND the PNRC SHALL HAVE NO RESPONSIBILITY OR LIABILITY FOR ANY LOSS, COST, EXPENSE OR DAMAGE YOU MAY SUFFER RELATED TO THE USE OF THE SOFTWARE.</p></td> </tr> <tr> <td><p>6. Indemnity. You agree to idemnify the PNRC, its directors and officers from any damages, costs and/or losses they or it may suffer as a result of any breach on your part (or on the part of your employees or agents) of the terms and conditions of this Agreement.</p></td> </tr> <tr> <td><p>7. Exclusion from the United Nations Convention on Contracts for the International Sale of Goods - The rights and obligations under this agreement shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods and/or any local implementing legislation, the application of which is expressly excluded.</p></td> </tr> <tr> <td><p>8. Governing Law - This agreement shall be governed by the laws of the Province of Ontario, Canada, excluding applicable conflict of law rules. You hereby submit to the exclusive personal jurisdiction and venue of the courts of the Province of Ontario with respect to matters related to this agreement.</p></td> </tr> <tr> <td><p>9. Force Majeure - Except for payment obligations hereunder, neither you nor the PNRC will be liable for any failure or delay in performing an obligation under this Agreement that is due to causes beyond its reasonable control, such as natural catastrophes, governmental acts or omissions, laws or regulations, labour strikes or difficulties or transportation stoppages or slowdowns. If any of these causes continues to delay or prevent performance for more than 90 days, the affected party may terminate this Agreement, effective immediately, upon notice in writing to the other party, which notice may be delivered by E-mail.</p></td> </tr> <tr> <td><p>10. Termination - This Agreement will automatically terminate if you fail to comply with any term hereof. No notice shall be required from the PNRC to effect such termination. You may also terminate this agreement at any time by notifying the PNRC in writing of termination, which notice may be delivered by E-mail. Upon any termination of this Agreement you shall immediately discontinue use of the Software.</p></td> </tr> <tr> <td><p>11. Miscellaneous - This Agreement shall constitute the complete and exclusive agreement between you and the PNRC and supersedes all other proposals, prior understandings or agreements between the parties pertaining to the Software. The terms and conditions of this Agreement may not be amended except by the PNRC providing you with at least 30 days written notice of amendment, which notice may be delivered by e-mail. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable and such decision shall not affect the enforceability of such provision under other circumstances, or of the remaining provisions hereof under all circumstances. </p></td> </tr> <tr> <td><INPUT type="button" value="Close Window" onClick="window.close()"> </td> </tr> </table> <p><button class="simplemodal-close">Close</button> <span>(or press ESC or click the overlay)</span></p> </div> </div> <!-- Load JavaScript files --> <script type='text/javascript' src='js/jquery.js'></script> <script type='text/javascript' src='js/jquery.simplemodal.js'></script> <script type='text/javascript' src='js/osx.js'></script> </body> </html> here is the CSS Code: body {height:100%; margin:0;} #osx-modal-content, #osx-modal-data {display:none;} /* Overlay */ #osx-overlay {background-color:#000; cursor:wait;} /* Container */ #osx-container {background-color:#eee; color:#000; font-family:"Lucida Grande",Arial,sans-serif; font-size:.9em; padding-bottom:4px; width:600px; -moz-border-radius-bottomleft:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius-bottomright:6px; -webkit-border-bottom-right-radius:6px; -moz-box-shadow:0 0 64px #000; -webkit-box-shadow:0 0 64px #000;} #osx-container a {color:#ddd;} #osx-container #osx-modal-title {color:#000; background-color:#ddd; border-bottom:1px solid #ccc; font-weight:bold; padding:6px 8px; text-shadow:0 1px 0 #f4f4f4;} #osx-container .close {display:none; float:right;} #osx-container .close a {display:block; color:#777; font-size:.8em; font-weight:bold; padding:6px 12px 0; text-decoration:none; text-shadow:0 1px 0 #f4f4f4;} #osx-container .close a:hover {color:#000;} #osx-container #osx-modal-data {padding:6px 12px;} #osx-container h2 {margin:10px 0 6px;} #osx-container p {margin-bottom:10px;} #osx-container span {color:#777; font-size:.9em;} Hi, on my site:http://www.jbiddulph.com/chrisbradshaw/ I need to be able to scroll the whole site horizontally, there may be 20 or so images, ther only way i have figured out how to do it is it guess a max width, like just put width: 5000px; but I cannot determine the whole width with however many images in the page?! I have a javascript below that gets the width of the first image but I need to get width of all images and add 20px padding to the right of each http://www.jbiddulph.com/chrisbradshaw/getwidth.html Can someone please help?! I have looked a Jquery sliders and scrollers and can only find carousels?! A div that moves the divs innerHTML with a scrollbar.
Good morning, I'm using the TDC JavaScript Ticker code and would like to have the data scroll from right to left. Code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="sagscroller.css" /> <script type="text/javascript"> //Note- Below example by JavaScriptKit.com function tdcticker(){ tickerSet.MoveNext(); if (tickerSet.EOF) //if end of data's file tickerSet.MoveFirst() setTimeout("tdcticker()",9000); } function init(){ tickerSet=ticker.recordset tickerSet.moveFirst() setTimeout("tdcticker()",9000) } </script> <a href="" datasrc="#ticker" class="ticker" datafld="messageURL" style="width:260px; border:0px solid black;"> <span id="tickerDiv" datasrc="#ticker" datafld="MESSAGES" ></span> </a> <script type="text/javascript"> if (document.all) ticker.ondatasetcomplete=init </script> Thanks in advance! Hello All, How can i want to capture onscroll event in Javascript ? Thanks in advance. Hi all, I am building a website with a smooth scroll function... that site is: katielipsitt.com/website As you will see if you click the menu links, the page scrolls too far up. I would like each div to stop right below the navigation. I am not very familiar with javascript, so I am wondering where in the code I would put this? I imagine I'll be able to put in something to tell the page to "scroll to Div'X' but leave 150 pixels of padding at the top" Is that possible? Thanks!! hello I have the Javasript , to Control the direction of Maarquee .. its very useful for any one , feel fre to use .. But not this why i'm here I need to Improve it , this code Has 4 Images , 1- on click Marquee Speeds up .. done 2- On click Marquee Slows Down .. done 3-On click Marque Go left .. done 4-On click Marque Do right .. done 5- On click Marque Scroll Up ............Needs Help to do it 6- On click Marquee Scroll Down .... Needs help to do it i want N# 5 , 6 done same way on clik on image to go up and down .. code PHP Code: <style type="text/css">a {text-decoration: none} a:link {color: black;}</style> <table style="width: 100%; direction: rtl; background-color: EBEBEC; border: 1px solid EBEBEC" cellspacing="3" cellpadding="3" class="style1"> <tr> <td style="width: 100px"> <img src="images/right_button.gif" title="Go Right" border="0" align="center" style="cursor:hand;" onclick="document.all.last_feed.direction='right';document.all.last_feed.start();"> <img src="images/left_button.gif" title="Go Left" border="0" align="center" style="cursor:hand;" onclick="document.all.last_feed.direction='left';document.all.last_feed.start();"> <img src="images/plus.gif" title="Speed Up" border="0" align="center" style="cursor:hand; " onclick="document.all.last_feed.scrollAmount=8;"> <img src="images/minus.gif" title="Slow Down" border="0" align="center" style="cursor:hand;" onclick="document.all.last_feed.scrollAmount=4;"> </td> <td style="font-family: tahoma; font-size: 0.75em"> <marquee id="last_feed" behavior="scroll" direction="right" scrolldelay="50" height="20" scrollamount="5" onmouseover="this.setAttribute('scrollamount', 0, 0); " onmouseout="this.setAttribute('scrollamount', 5, 0);" >Your Text here</marquee></td></tr></table> Hello all kind people I have this scroll to top code, but to edit it need some help. the problem is that I will not see this eksamplen the page evry time, would like to reach all the way down on the side to be displayed. Thanx for all comment and help Here is Scroll to Top code: <script type="text/javascript"> $(document).ready(function() { $('.top').addClass('hidden'); $.waypoints.settings.scrollThrottle = 30; $('#wrapper').waypoint(function(event, direction) { $('.top').toggleClass('hidden', direction === "up"); }, { offset: '-100%' }).find('#main-nav-holder').waypoint(function(event, direction) { $(this).parent().toggleClass('sticky', direction === "down"); event.stopPropagation(); }); }); </script> Hi, When I use the following code snippet in all major browsers (Chrome, FF, Safari, Opera, IE8), the window opens with a scroll bar and it is resizeable EXCEPT IN IE8. In IE8, there's no vertical scroll bar and it's not resizeable... any idea why not? window.open('http://www.mysite.shtml?' + report_vars, '', "status=no, toolbar=no, location=yes, menubar=no, scrollbars=yes, alwaysRaised=yes, resizable=yes, width=" + window.outerWidth / 1.1 + ", height=" + window.outerHeight-0.1); Thanks for reading! ~ kberry |