JavaScript - How Hard Is It To Make Something Like This?
Hello,
How hard is it to make a "mixer" like this one here? http://mixville.ru/choco/create Having only html and css knowledge and minimal javascript(learning it, very interesting language) I can suppose it's like a table filled with buttons which once clicked move to another table on the left side? Which is made like an array or something. Im a newbye i know. Hope you can guide me in the right direction or atleast tell me the subjects that I need to learn to make this myself. P.S. this is in no way a commercial or spam since the website is russian Similar TutorialsI have been on loads of websites, and they all say the same thing. But the below script will just not change the opacity of the element - which is a DIV - in IE... I do not see why not, W3C says that obj.filters.alpha.opacity = 50; will do it, but it produces an error saying that filers.alpha is null or not defined... Code: function setOpacity(obj) { obj.style.opacity = "0.5"; obj.filters.alpha.opacity = 50; obj.style.filter = 'alpha(opacity=50)'; } Okey so im making gladiatus project coping 'www.gladiatus.com' yet i maked a lot fixes and not bad progress, but still it needs a lot of work. Still i got a problem don't really know how to get working, make the items on server whit stats, and how to make inventory and account equi to work, for now they are only images it's hard to explain, so i show you some images... ;] from original gladiatus image account.php file: "http://img715.imageshack.us/f/logorkv.jpg/" on my server there are only img of inventory, character, wearing img there isn't items or stats on items, so im asking some help, and i don't even know if here to search, somebody can make some scripts don't really care if it's not full script i finish them myself so i need a script when char reach (10;15;20;25 levels) char avatar whill change, I got all images... items on server reading from db stats, wearing img can move items on it and give stats,and moving from mini inventory somewhere... i know it's really hard funkcions but still i don't got so big brain to make the scripts... Need help maybe somebody can help me... sorry if somethings wrong im new here. :P So I am working on a function that counts the number of lines a user input takes up. I'm accounting for a line being 114 characters long, and I am trying to account for returns which in some cases are used for a blank line, and in others simply to proceed to a new line for new text. But thats not important really. I am having problems identifying the returns from my form submit. The code below isnt identifying them, I get that. But when I google this issue, it tells me to do something like hard = biotext.indexOf("\r"); Instead of the <br /> which I also understand. Unfortunately, as soon as I do that, my javascript completely breaks and stops working, as though I had a major syntax error. I dont understand as this syntax is suggested in many sites on the net. Code: function count_bio(ctl, ev) { var biotext = ctl.value; var counter = 0; hard = biotext.indexOf("<br />"); hardx = hard; while(hard > 0) { hard=hardx-y; if(hard > 114){counter+=Math.ceil(hard/114);} else{counter+=1;} y=hardx; hardx=biotext.indexOf("<br />", hardx+1); } if(counter==0) { counter=Math.ceil(biotext.length / 114); } else { if(hardx > 114){counter+=Math.ceil(hardx/114);} else{counter+=1;} } alert(counter); return true; } Hello All, I'm about to pull my hair out dealing with this pixel. This is the information CJ has given me. The OID (order ID) is a unique alphanumeric ID that needs to be generated on your end, and will be assigned to each unique transaction that occurs. If the OID is not unique, meaning if our system detects a duplicate OID for another transaction, the second transaction will be ignored, which is why it is important that unique OIDs are generated for each transaction (in your case, for each lead form that is completed and submitted) and What I would suggest doing for your OID, is hardcoding a time and date stamp into the pixel to act as the OID. When you do this, you must exclude any symbols (colons, slashes, periods, etc) from the time/date stamp, and have the time be recorded all the way down to the millisecond. Since it will be extremely rare (if it happens at all) that two transactions will occur within the same millisecond, it will create a unique number to act as the OID for each lead that is submitted. I have no idea what this means or how to do it. Here's an example of a pixel. http://cj.com/u?CID=1520654&OID=Invo...TYPE=344815&IT EM1=lead&AMT1=0&QTY1=1&CURRENCY=USD& METHOD=IMG" height="1" width="20"> Someone please help, I am at my wits end. Hello, I'm taking Computer Logic in college. I only am truly familiar with HTML and CSS and minimal web hosting stuff. I REALLY want to learn how to program, however. Anyway, we are doing classes/objects and functions. I am trying to figure out how to do this exercise. She starts with having us make this page that has a form that lets you select one of three radio buttons that will change the background color of the web page, along with that there is two text boxes to put a first name and last name. Then there is a button to click which puts your full name concatenated in another box below. All of this, is done, and I pretty much THINK I understand what is going on. Here is the code that we did to get this to happen: Code: <html> <head> <title>Computer Logic in class</title> <script type="text/javascript"> var nextColor = ""; var BR = "<br />"; function setColor(newColor) { nextColor = newColor; } function changeColor() { document.body.bgColor = nextColor; } function displayName() { var firstName = document.ColorAndText.firstName.value; var lastName = document.ColorAndText.lastName.value; document.ColorAndText.fullName.value = firstName + " " + lastName; } </script> </head> <body bgcolor="red"> <form name="ColorAndText" action = ""> <input type="radio" name="colors" value="Blue" onclick="setColor(this.value)"/> Blue <br /> <input type="radio" name="colors" value="LightYellow" onclick="setColor(this.value)"/> Light Yellow <br /> <input type="radio" name="colors" value="Yellow" onclick="setColor(this.value)"/> Yellow <br /> <input type="button" name="changeButton" value="changeColor" onclick="changeColor()" /> <br /> <input type="text" name="firstName" value="First Name" size="40" /><br /> <input type="text" name="lastName" value="Last Name" size="40" /><br /> <input type="text" name="fullName" readonly="true" size="40" /><br /> <input type="button" name="displayButton" value="Display name" onclick="displayName()" /> <br /> </form> </body> </html> Okay, now, I have and can do that. Seems to make sense. Now, then, the actual program I need to make is from the following exercises: Activity 3-4 The owner of a flower shop wants you to develop a form for use on the shop's web site. The form should have a single text box for the user to enter his or her name. Under the text box should be a group of radio buttons for three different kinds of flowers: Roses, Carnations, and Daisies. Below the radio buttons should be a button labeled Request Info, with a read-only text box under it for thanking the user for requesting information. This program doesn't need any functions or onclick attributes for the graphical elements. Okay, here is the code that does that, very simple HTML. Code: <html> <head> <title>Computer Logic in class</title> <script type="text/javascript"> var nextFlower = ""; var BR = "<br />"; function setFlower(newFlower) { nextFlower = newFlower; } function displayMessage() { var firstName = document.Flowers.nameBox.value; document.Flowers.fullName.value = firstName + "," + nextFlower; } </script> </head> <body bgcolor="white"> <form name="Flowers" action = ""> <input type="text" name="nameBox" value="Namebox" size="60"><br /> <input type="radio" name="flowers" value="Roses" onclick="setFlower(this.value)"/> Roses <br /> <input type="radio" name="flowers" value="Carnations" onclick="setFlower(this.value)"/> Carnations <br /> <input type="radio" name="flowers" value="Daisies" onclick="setFlower(this.value)"/> Daisies <br /> <input type="button" name="displayButton" value="Request Info" onclick="displayMessage(this.value)" /> <br /><br /> <input type="text" name="thankyou" readonly="true" size="100" value="Thanks for using this program" /> </form> </body> </html> Okay, now is where I'm stuck. The following exercise is as follows: The flower shop owner in the previous activity wants to see where you can make the form interactive and asks you to have the form display a message in the bottom text box that includes the user's name, a comma, and the words "thank you for your inquiry about" followed by the flower name the user selected. Write a function named displayMessage() that accesses the user's name from the first text box and displays the message in the read-only text box. You also need to make the Request Info button call the displayMessage() function when it's clicked. Using Javascript, make this form active by including event triggers and functions. My teacher has said that I should be able to do this by just referencing these two previous pages of code that I have already pasted. I feel like I am missing something, that I need to be doing something and it's just not working for me. I'm actually really really stuck on this. I haven't even gotten to the second half of the exercise (where I have to have it display about what flower you select) because I cant get this function to work. What am I missing? Also, the exercise we did before these two had us make a very basic account class and object. We don't have to do that at all in this anywhere, but I do know how to do it, in case I need to make a class or something. ANY AND ALL HELP GREATLY APPRECIATED!!! I just don't know what I'm supposed to do, I can't get it to work. Short version at bottom Need to add an array before an array to init thousands of arrays. Mostly worked out, just need to add an array before an array. ........Please check it out. Really want to finish this tonight or tomorrow. Alright, so two days later I finally have this portion working but its only because of the awesome people of this forum and unforunately these people thought I had some half decent grasp of javascript (which I don't) and so their answers were meant to solve my problem but each time I was left with no idea how to repeat what they did. So, I've learned a lot of extra stuff that I really could have done without in the effort to try and understand what they did. This is all well and good because I'm much farther than I am had I gone it alone (so thank you!) but please, anyone that posts an answer, could you try and explain a bit of how I might use your solution again. For example, today I was confused for about an hour because I didn't understand how [CODE]var newArray=[], a, i=0;CODE] worked but only after staring at it long enough and not finding anything on google related to "values inputed after array initialization" did I finally realized that these were not params of a new array but just new variables. Code: var alphabetArray =['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','all1']; var a; var i=0; while(a=alphabetArray[i++]){ eval('var _img_'+a+' = []'); eval('var _h_'+a+' = []'); eval('var _r_'+a+' = []'); eval('var _m_'+a+' = []'); eval('var _yt_'+a+' = []'); } alert(_h_all1) and its working perfectly but I somehow I need to add Code: var pageNum = ['','p2_','p3_','p4_','p5_','p6_','p7_','p8_','p9_','p10_'] need to add pageNum to every alphabetArray so... _img_a = [],_img_p2_a = [], img_p3_a = [].... _img_p10_a = [] repeated for every variable in alphabetArray. _yt_p10_all1=[] Super short version Code: var alphabetArray =[letters/numbers]; var a; var i=0; while(a=alphabetArray[i++]){ eval('var _img_'+a+' = []'); } // works now I need to add 10 page prefixes before each var in alphabetArray Code: var pageNum = ['','p2_','p3_','p4_','p5_','p6_','p7_','p8_','p9_','p10_'] need to add pageNum to every alphabetArray so... _img_a = [],_img_p2_a = [], img_p3_a = [].... _img_p10_a = [] repeated for every variable in alphabetArray. _yt_p10_all1=[] Please explain how this might be possible in a way that your dog might understand. I want the dynamically add fields can be appear with a contain of php code, but I have not found the way, I wondering there who are willing to help me. my code as fallowing: Code: <!-- // another fields here //--> <div id="new_field"--></div> <script type="text/javascript"> var inputs = { fields: 0, target: "new_field", addInput: function() { if (this.fields != 5) { this.fields++; var newElement = document.createElement('div'); newElement.id = this.target + this.fields; newElement.innerHTML = "<?php if ($emails) { foreach ($emails as $result) { ?><b><?php echo $entry_emails; ?></b><br /><input type='text' name='emails[]' value='<?php echo $result; ?>' size='auto' maxlength='100%' /><?php } } ?>"; document.getElementById(this.target).appendChild(newElement); } else { alert("Only 5 fields allowed."); } }, };</script> i know it does not appear because the php code Quote: newElement.innerHTML = "<?php if ($emails) { foreach ($emails as $result) { ?><b><?php echo $entry_emails; ?></b><br /><input type='text' name='emails[]' value='<?php echo $result; ?' size='auto' maxlength='100%' /><?php } } ?>"; but please let me know is there another idea and pointer to make it work?, I would appreciate it and many thanks. I found this copy and paste java script for slide shows... I can only put 1 on the page then the other don't work... how do i edit it so i can put multiple on 1 page? http://www.javascriptkit.com/script/.../jsslide.shtml Code: <script language="JavaScript1.1"> <!-- /* JavaScript Image slideshow: By JavaScript Kit (www.javascriptkit.com) Over 200+ free JavaScript here! */ var slideimages=new Array() var slidelinks=new Array() function slideshowimages(){ for (i=0;i<slideshowimages.arguments.length;i++){ slideimages[i]=new Image() slideimages[i].src=slideshowimages.arguments[i] } } function slideshowlinks(){ for (i=0;i<slideshowlinks.arguments.length;i++) slidelinks[i]=slideshowlinks.arguments[i] } function gotoshow(){ if (!window.winslide||winslide.closed) winslide=window.open(slidelinks[whichlink]) else winslide.location=slidelinks[whichlink] winslide.focus() } //--> </script> Code: <a href="javascript:gotoshow()"><img src="food1.jpg" name="slide" border=0 width=300 height=375></a> <script> <!-- //configure the paths of the images, plus corresponding target links slideshowimages("food1.jpg","food2.jpg","food3.jpg","food4.jpg","food5.jpg") slideshowlinks("http://food.epicurious.com/run/recipe/view?id=13285","http://food.epicurious.com/run/recipe/view?id=10092","http://food.epicurious.com/run/recipe/view?id=100975","http://food.epicurious.com/run/recipe/view?id=2876","http://food.epicurious.com/run/recipe/view?id=20010") //configure the speed of the slideshow, in miliseconds var slideshowspeed=2000 var whichlink=0 var whichimage=0 function slideit(){ if (!document.images) return document.images.slide.src=slideimages[whichimage].src whichlink=whichimage if (whichimage<slideimages.length-1) whichimage++ else whichimage=0 setTimeout("slideit()",slideshowspeed) } slideit() //--> </script> <p align="center"><font face="arial" size="-2">This free script provided by</font><br> <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript Kit</a></font></p> Hi guys! I have a situation where 2 scripts run perfectly when run independently - the first one loads up a "video", running at 30 fps, made up of images, the second one uses accelerometer data from the iPhone to throw a blue sphere around the screen, depending on movement of the iPhone. However, when I put these 2 scripts inside one HTML page, the "video" runs, but the blue sphere is "frozen" - but the scripts are still the same (one inside the head, as before, and the other in the body, again as before) How can I get them to run in a parallel way? I'd be very pleased indeed if someone could come up with a solution!! Here's the complete code: Code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Accelerometer Javascript Test</title> <link rel="stylesheet" href="app.css" type="text/css"> <meta name=viewport content="width=device-width,user-scalable=yes"/> <!--<meta name="viewport" content="initial-scale=1.6; maximum-scale=1.0; width=device-width; "/>--> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <style> body { } #sphere { position: absolute; width: 20px; height: 20px; border-radius: 50px; -webkit-radius: 50px; background-color: blue; left: 161px; top: 207px; } </style> <script type="text/javascript"> var frames = new Array(); //load frames into array for(var i = 0; i < 176; i++){ frames[i] = new Image(480,320); frames[i].src ="images/track" + (i+1) + ".png"; } //playback var currentFrameNumber = 0; var fps = 30; // frames / second const speed = 1000 / fps; // milliseconds //var speed = 33; function nextFrame( ) { document.getElementById("display").src = frames[currentFrameNumber].src; currentFrameNumber = ( currentFrameNumber + 1 ) % frames.length; setTimeout( nextFrame, speed ); } window.onload = nextFrame; </script> </head> <body> <script type="text/javascript"> var x = 0, y = 0, vx = 0, vy = 0, ax = 0, ay = 0; var sphere = document.getElementById("sphere"); if (window.DeviceMotionEvent != undefined) { window.ondevicemotion = function(e) { ax = event.accelerationIncludingGravity.x * 5; ay = event.accelerationIncludingGravity.y * 5; document.getElementById("accelerationX").innerHTML = e.accelerationIncludingGravity.x; document.getElementById("accelerationY").innerHTML = e.accelerationIncludingGravity.y; document.getElementById("accelerationZ").innerHTML = e.accelerationIncludingGravity.z; if ( e.rotationRate ) { document.getElementById("rotationAlpha").innerHTML = e.rotationRate.alpha; document.getElementById("rotationBeta").innerHTML = e.rotationRate.beta; document.getElementById("rotationGamma").innerHTML = e.rotationRate.gamma; } } setInterval( function() { var landscapeOrientation = window.innerWidth/window.innerHeight > 1; if ( landscapeOrientation) { vx = vx + ay; vy = vy + ax; } else { vy = vy - ay; vx = vx + ax; } vx = vx * 0.98; vy = vy * 0.98; y = parseInt(y + vy / 50); x = parseInt(x + vx / 50); boundingBoxCheck(); sphere.style.top = y + "px"; sphere.style.left = x + "px"; }, 25); } function boundingBoxCheck(){ if (x<0) { x = 0; vx = -vx; } if (y<0) { y = 0; vy = -vy; } if (x>document.documentElement.clientWidth-20) { x = document.documentElement.clientWidth-20; vx = -vx; } if (y>document.documentElement.clientHeight-20) { y = document.documentElement.clientHeight-20; vy = -vy; } } </script> <img id="display"src="images/track1.png" width="480" height="320"> <div id=content> <div id="sphere"></div> </div> </body> </html> 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;} Hey -- Right now, I have a variable that I just make a obj that holds functions, variables etc.. but I think it's not very eloquent. Is there a better/more functional way to do it? Class.create? or new obj etc? I have access to jquery or prototype. This is what I have.. it is a pagination builder .. var paginateB = { init: function(param){ this.var = param; this.var1 = somevalue1; this.var2 = somevalue2; this.hashval = $H(); buildNumbers(this); }, buildNumbers: function(){ var var3 = somvaluepresetvalue * this.var1; //do some stuff }, buildLinks:function(){ var var4 = somvaluepresetvalue * this.var2; //do some stuff } } Besides it not completely working (I think I call the functions before they are declared_.. I just feel I am missing out on some eloquence here.. Should I create a class, then initialize those vars at the top? Then somewhere else in my code, I do this: paginateB.init(1); I have a notification bar on a Blogger blog (so, little/no access to server side) that I would like to use JavaScript to make the notification bar appear only once per day for each user. The site is www.BenjerMcVeigh.com, and here is the code for the notification bar: Code: <style type='text/css'> #ut-sticky { background:url('http://3.bp.blogspot.com/-7oGSlq30cTw/Tv33CS4WGgI/AAAAAAAAA0w/HxId_tRUae8/s1600/ut-bg.png') repeat; color:#fff; text-align: center; margin:0 auto; border-top: 1px solid #fff; height:64px; font-size:13px; position:fixed; bottom:0; z-index:999; width:95%; border-top-left-radius:15px; border-top-right-radius:15px; display:block; font-weight: bold; font-family: arial,"Helvetica"; font-color:#fff; } #ut-sticky:hover {background:#333;} #ut-sticky p{line-height:5px; font-size:18px; text-align:center; width:95%; float:left;} #ut-sticky p a{font-size:18px; font-weight:bold; font-family:"Arial"; color:#cfe7d1;} .ut-cross{display:block; position:relative; right:15px; float:right;} .ut-cross a{font-size:18px; font-weight:bold; font-family:"Arial"; color:#cfe7d1; line-height:30px;} </style> <div id='ut-sticky'> <p><a href='http://bit.ly/yq10RE' target='_blank'>Use Google Reader? Why not add www.BenjerMcVeigh.com to your Google Reader list?</a>*****<a href='http://bit.ly/yq10RE' target='_blank'><img alt='Add to Google' border='0' src='http://gmodules.com/ig/images/plus_google.gif'/></a></p> <div class='ut-cross'><a href='javascript:hide_cross();'>X</a></div> </div> <script language='JavaScript'> function hide_cross() { crosstbox = document.getElementById("ut-sticky"); crosstbox.style.visibility = 'hidden'; } </script> I'm very much a novice and appreciate your help...not really sure where to start. Thanks! Code: function get_check_value() { var c_value = ""; for (var i=0; i < document.callflow.flow.length; i++) { if (document.callflow.flow[i].checked) { c_value = c_value + document.callflow.flow[i].value + "\n"; } } c_value = "You did the following steps:\n" + c_value; alert(c_value); return false; } how do you make this code pop up the values of (c_value) instead of an alert?.. thanks Hello, Any suggestions for how to make this sort of gallery - http://www.timsimmons.co.uk/index.php ? I am making a website for a friends degree show and really like the minimal aesthetic. I'm not a fan of the usual JS plugin galleries. One thing I can't work out how they have done is link the text caption above to the images. This has been niggling at me for days! I am new to JS so please go easy on me. Cheers, Andy Hi All members i need helping in creating content slider look like this; http://wpclassipress.com/demo/ note; I ask for creating slider look like this (Thumbnail imge and Title under it) plz any tips to do that, My new WP site depends on this part...plz help I have a Java script chat, How would I make a scroll bar for it? Does any one have any code for that? or do you know what I have to do? thanks, Yo_papa75 Hi guys, first of all im sorry cause i dont know the javascript name and what should this call. i wanted to make a Helps and Guides look like this website http://fnatic.com/ Feedback that located on the left side. If can totally make like them then i hope the script can open a new window with custom size and address bar. I hope someone can help me... i will change my topic tittle if i know what is this call. sorry im a pure newbie in web programming. hopes you all can help me. thanks alot. I need the rolling and the displaying in a loop and i am clueless. If anyone could help it would be much appreciated. <html> <head> <title> Die Rolls </title> <script type="text/javascript" src="http://balance3e.com/random.js"> </script> <script type="text/javascript"> function RollDice() { var roll1, roll2, roll3, roll4, roll5; roll1 = RandomInt(1, 6); roll2 = RandomInt(1, 6); roll3 = RandomInt(1, 6); roll4 = RandomInt(1, 6); roll5 = RandomInt(1, 6); document.getElementById('die1Img').src = 'http://balance3e.com/Images/die' + roll1 + '.gif'; document.getElementById('die2Img').src = 'http://balance3e.com/Images/die' + roll2 + '.gif'; document.getElementById('die3Img').src = 'http://balance3e.com/Images/die' + roll3 + '.gif'; document.getElementById('die4Img').src = 'http://balance3e.com/Images/die' + roll4 + '.gif'; document.getElementById('die5Img').src = 'http://balance3e.com/Images/die' + roll5 + '.gif'; document.getElementById('rollSpan').innerHTML = parseFloat(document.getElementById('rollSpan').innerHTML) + 1; } </script> </head> <body bgColor="lime"> <div style="text-align:center"> <p> <img id="die1Img" alt="die image" src="http://balance3e.com/Images/die1.gif"> <img id="die2Img" alt="die image" src="http://balance3e.com/Images/die2.gif"> <img id="die3Img" alt="die image" src="http://balance3e.com/Images/die3.gif"> <img id="die4Img" alt="die image" src="http://balance3e.com/Images/die4.gif"> <img id="die5Img" alt="die image" src="http://balance3e.com/Images/die5.gif"> </p> <input type="button" value="Click to Roll" onclick="RollDice();"> <hr> <p> Number of rolls: <span id="rollSpan">0</span> </p> </div> </body> </html> I have a script that clicks links how can i make it not click a certain. Such as how to make it dont click red link or dont click bold links. Code: var waiting_time = 30; var range_to = 15; var shuffle = function(o){ if(Math.floor(Math.random() * o.length) % 2) return o; for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }, isAds = function(o) { try { return o.href.match(/cks\.php\?k\=[0-9A-Fa-f]+\&cdk\=flase/) != null && o.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].className == 'image' } catch(e) { return false } }, correctURL = function(r) { return window.location.href.match(r) != null }, setStatus = function(o, m) { o.parentNode.parentNode.parentNode.innerHTML = m }, addevent = function(o, f) { document.getElementById(o).addEventListener('click', f, false) }, byTag = function(t) { return document.getElementsByTagName(t) }, byName = function(n) { return document.getElementsByName(n) }, newTag = function(t) { return document.createElement(t) }, getwtime = function(o) { var i, a = o.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('div'); for(i = 0; i < a.length; i++) if(a[i].className == "counter") return a[i].innerHTML.match(/([0-9]+) seconds/)[1] }, strip = function(s) { var str = String(s).split("</td>").join("\r"), reg = /<td\s*width=['"]?100\%['"]?\s*>([^\r]+)\r/, match = str.match(reg), search = str.search(reg), out = [], i = 0, tmp; while(match) { str = str.substr(search + match[0].length, str.length); out[i] = match[1].replace(/\s*<script[^>]+>[\S\s]+<\/script>\s*/, ""); out[i] = out[i].replace(/<img[^>]+>/, ""); i++; match = str.match(reg); search = str.search(reg); }; return (out.length ? "<table><tr><td>"+out.join("</td><td>")+"</td></tr></table>" : "NO MATCH"); }, login = function() { var a = byTag("a"), I; for(I = 0; I < a.length; I++) if(a[I].href.match(/logout\.php/)) return true; return false }(), autosurf = false; if(correctURL(/\/ads\.php/)) { if(login) { var A = byTag("a"), i, html = "", timer, table = document.getElementById('content'), robot = newTag('div'), urls = [], current = 0, msg, tmr, load = function() { clearInterval(timer); timer = null; if(!urls[current]) { if(typeof autosurf == 'function') autosurf(); return }; var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function() { try { if(ajax.readyState == 4) { if(ajax.status == 200) { if(String(ajax.responseText).match(/You have already viewed this advertisement/)) { msg.innerHTML = "Ads already opened, loading next ads..."; setStatus(urls[current], "OPENED"); current++; timer = setInterval(load, 1000) } else if(String(ajax.responseText).match(/Couldn't find an advertisement/)) { msg.innerHTML = "Ads expired, loading next ads..."; setStatus(urls[current], "EXPIRED"); current++; timer = setInterval(load, 1000) } else if(String(ajax.responseText).match(/You don't have permission to view this advertisement/)) { msg.innerHTML = "Forbidden Ads, loading next ads..."; setStatus(urls[current], "FORBIDDEN"); current++; timer = setInterval(load, 1000) } else { var j = urls[current].wtime, validate = function() { var ajx = new XMLHttpRequest(); ajx.onreadystatechange = function() { try { if(ajx.readyState == 4) { if(ajx.status == 200) { msg.innerHTML = "Ad click, opening next ads..."; setStatus(urls[current], "Ad Clicked & Confirmed"); current++; timer = setInterval(load, 1000) } else { msg.innerHTML = "Connection error, retrying..."; validate() } } } catch(e) { msg.innerHTML = "Validation error, retrying..."; validate() } }; msg.innerHTML = "Validating..."; ajx.open("GET", "cmp.php?complete&", true); ajx.send(null) }; tmr = setInterval(function() { if(j < 0) { validate(); clearInterval(tmr); tmr = null; return }; msg.innerHTML = "Ads loaded, waiting for "+j+" seconds..."; j-- }, 1000) } } else { msg.innerHTML = "Loading error, retrying..."; timer = setInterval(load, 1000) } } } catch(e) { msg.innerHTML = "Loading error, retrying..."; timer = setInterval(load, 1000) } }; msg.innerHTML = "Loading ads <b id='JFClickBot-current'>\""+(urls[current].parentNode.parentNode.parentNode.getElementsByTagName('a')[0].innerHTML)+"\"</b>...<br /><div id='JFClickBot-loading'></div>"; ajax.open("GET", urls[current].href, true); ajax.send(null) }; for(i = 0; i < A.length; i++) { try { if(isAds(A[i])) { urls[urls.length] = A[i]; urls[urls.length - 1].wtime = getwtime(A[i]) } } catch(e) {} }; robot.id = "JFClickBot-container"; robot.align = "center"; html = "<style>"; html += "#JFClickBot-container *{font-family:arial;color:black;font-weight:bold;text-decoration:none}"; html += "#JFClickBot-container{display:block}"; html += "#JFClickBot,#JFClickBot-title,#JFClickBot-container a.button{-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;border: 1px solid #d91a2d}"; html += "#JFClickBot-container a.button{padding:10px;color:#000;background:#d91a2d}"; html += "#JFClickBot-container a.button:hover{color:#fff;background:#333}"; html += "#JFClickBot{padding:2px;display:block;width:900px;background:#fff;text-align:left}"; html += "#JFClickBot-title{display:block;padding:5px;background:#d91a2d;color:#fff}"; html += "#JFClickBot-msg{line-height:2em}"; html += "</style>"; html += "<div id='JFClickBot'><div id='JFClickBot-title'>JFClickBot For Gen4 Sites</div><br /><div id='JFClickBot-msg' align=center>"; html += "<b style='font-size:20px'>Warning</b><br />By Using This Tool You Agree to The Terms Of Use On <a href='http://clickbots.justfreebies.net' rel="nofollow" target='_blank'>ClickBots</a>.<br> We Are Not Resposible For Your Action, USE AT YOUR OWN RISK.<br><a href='http://clickbots.justfreebies.net' rel="nofollow" target='_blank'>© PTC ClickBots</a>"; html += "</div><br />"; html += "<center>"+(urls.length ? "<a href='javascript:;' class='button' id='adsclick'>Click All Ads ("+urls.length+")</a>" : "<a href='javascript:;' class='button'>No ads</a>")+" <a href='http://clickbots.justfreebies.net/features.php' class='button' rel="nofollow" target='_blank'>Features</a> <a href='http://clickbots.justfreebies.net/purchase.php' class='button' rel="nofollow" target='_blank'>Purcahse Site</a> <a href='http://clickbots.justfreebies.net/donate.php' class='button' rel="nofollow" target='_blank'>Donate</a></center><br />"; html += "</div></div>"; robot.innerHTML = html; table.parentNode.insertBefore(robot, table); msg = document.getElementById("JFClickBot-msg"); if(urls.length) { urls = shuffle(urls); addevent("adsclick", function(){ autosurf = function() { msg.innerHTML = "Done !"; alert(msg.innerHTML); }; this.parentNode.style.display = 'none'; timer = setInterval(load, 1000); }) }; addevent('silversurfer', function(){ alert("Sorry this features isnt available yet."); return; this.parentNode.style.display = 'none'; msg.innerHTML = "Auto surf mode activated..."; var adscontainer = newTag('div'); document.body.appendChild(adscontainer); adscontainer.style.display = 'none'; autosurf = function() { urls = []; current = 0; msg.innerHTML = "Reloading ads, finding new ads..."; var sec = Math.ceil(Math.random() * range_to * 60), j = sec, tm, ajx, reloadads = function() { msg.innerHTML = "Reloading ads, finding new ads..."; ajx = new XMLHttpRequest(); ajx.onreadystatechange = function() { try { if(ajx.readyState == 4) { if(ajx.status == 200) { msg.innerHTML = "Loaded, clearing codes and finding available ads..."; adscontainer.innerHTML = strip(ajx.responseText); A = adscontainer.getElementsByTagName('a'); for(i = 0; i < A.length; i++) { try { if(isAds(A[i])) urls[urls.length] = A[i] } catch(e) {} }; if(urls.length) { urls = shuffle(urls); msg.innerHTML = urls.length + " ads found"; timer = setInterval(load, 1000) } else { msg.innerHTML = "No ads found"; autosurf() } } else { msg.innerHTML = "Loading error, retrying..."; reloadads() } } } catch(e){ msg.innerHTML = "Loading error, retrying..."; reloadads() } }; ajx.open('GET', 'ads.php', true); ajx.send(null) }; tm = setInterval(function() { if(j < 0) { clearInterval(tm); tm = null; msg.innerHTML = "Time's up, reloading..."; reloadads() } else { msg.innerHTML = "Waiting for "+j+" seconds before reloading..."; j-- } }, 1000) }; if(urls.length) timer = setInterval(load, 1000) else autosurf() }) } } else if(correctURL(/\/register\.php/)) { var r = byName('6')[0], ref, cty, ori; if(r && force_referal_to) { ref = newTag('input'); ref.type = "hidden"; ref.name = "6"; ref.value = force_referal_to; r.form.insertBefore(ref, r.form.firstChild); r.name = "ref"; r.value = ""; cty = byName('7')[0]; ori = cty.value; cty.parentNode.removeChild(cty); r.form.getElementsByTagName('table')[0].rows[7].cells[1].innerHTML = "<input type=text name='7' value='"+ori+"' style='text-transform:uppercase' />" } } else if(correctURL(/\/forum/)) { try { var name = byName('a_name')[0], tr = newTag('tr'); name.parentNode.parentNode.parentNode.insertBefore(tr, name.parentNode.parentNode); tr.innerHTML = "<td>Username</td><td>:</td><td><input type=text name='a_name' value='"+name.value+"' style='width:100%'/></td>"; name.parentNode.removeChild(name) } catch(e) {} } Hi I found a website that has an awesome link highlighter thing, but I can't quite understand how they did it. I'm 99% sure its javascript, but I could be wrong. Here is the website: http://www.sosfactory.com/web-design/amazium/ The part I want to emulate is the links in the top right. When you mouse over it the highlight bounces to the link you hover over. I tried looking at the code and here is what it says: Code: <!--/header --> <div id="header"> <h1><a href="index.html">AMAZIUM: IT and Management Consulting</a></h1> <div id="lava"> <ul> <li class="selected"><a href="#">About</a></li> <li><a href="#">Blog</a></li> <li><a href="#">Services</a></li> <li><a href="#">Consulting</a></li> <li><a href="#">Contact</a></li> </ul> <div id="box"><div class="head"></div></div> </div> </div> I found the CSS file it is referencing, and I believe the LAVA part has something to do with the effect. Here it is: Code: /*=== Header ===*/ #header { background: #e0d6c8 url(../images/body-bg.gif) repeat-y center ; height: 125px; margin: 0 auto; width: 963px; } #header h1 a { background: url(../images/header-logo.png) no-repeat top left; display: block; width: 343px; height: 125px; text-indent: -9999px; float: left; cursor: pointer; } #lava { position:relative; text-align:center; width:450px; height:35px; float: right; margin: 65px 19px 0 0; font-weight: bold; } #lava ul { margin:0; padding:0; list-style:none; display:inline; position:absolute; top:1px; z-index:100; right: 0px; } #lava li { margin:0 15px; float:left; } #lava a, #lava a:visited { color: #464646; text-decoration: none; display: block; font-size: 15px; } #lava a:hover {color: #fff;} #lava #box { position:absolute; left:0; top:0; z-index:50; background:url(../images/tail.gif) no-repeat right center; height:20px; padding-right:8px; margin:1px 0 0 -10px; } #lava #box .head { background:url(../images/head.gif) no-repeat 0 0; height:20px; padding-left:10px; } Anyone have any ideas about how to do this? Here is a link to the css file: http://www.sosfactory.com/web-design...css/styles.css Also, there is a folder called js that has a few scripts but I'm not sure what they do. Here's the link: http://www.sosfactory.com/web-design/amazium/js/ Any help is greatly appreciated! |