JavaScript - Noobie Help With Javascript Code
Code:
<body> <title>Array Games</title> <script type="text/javascript"> var City = new Array(); var uNoGo = false; var endIt = false; alert("Hello! This program does two things! One, it asks for five cities. It stores the city names in an array cause arrays are what we're doing this chapter. Then it tells you the city names VIA said array! Secondly, it asks you for a number between 1 and 250,00. It then checks if the number is a perfect square! Uses Binary Search. ;)"); while(!endIt) { for(var i=0;i<5;i++) { City[i] = prompt("Please enter in a city name!",""); } for(var i=1;i<6;i++) { var msg += "\n" + "Your number " + i + " city is: " + City[i-1]; } alert(msg); while(!uNoGo) { var Sq = prompt("Enter in a number between 1 and 250,000.", ""); if(Sq >= 1 && Sq <= 250000) { var Mebe = Math.sqrt(Sq); if(Math.round(Mebe)*Math.round(Mebe)==Sq) { alert("Gratz! Your number is a perfect square."); } else { alert("We're sorry, the number you have chosen is not a perfect square. It may be a circle but we don't know. Good luck next time!"); } uNoGo = true; } else { alert("You entered in something invalid! WARNING NUCLEAR MELTDOWN IMMINENT!"); } } var cont = prompt("Do you want to ride again? Type N to stop, anything else to continue.",""); if(cont=="\\") { alert("As you came around the corner... SSSSSSSSSSSSSSSSSS. There goes your dirt house."); } if(cont=="N" || cont=="n") { endIt=true; alert("Thank you, come again."); } } </script> </body> </html> I am trying make this codes work in a browser as javascript but nothing shows up Similar TutorialsHello, I am working on making a starting hub website for myself. I have four images that are the background image in a table. I would like to have all four pictures be something different every time the page is loaded. Currently I can only get one image to rotate and the rest just show blank with no picture at all. I would like to have all four pictures show and have them rotate their image on page refreshes. Is this possible using just Javascript and HTML? Here is my code: This is my Javascript Code: <script type="text/javascript"><!-- var backgroundImages=new Array(5); backgroundImages[0]="images/backgrounds/firework.jpg"; backgroundImages[1]="images/backgrounds/friends.jpg"; backgroundImages[2]="images/backgrounds/firework.jpg"; backgroundImages[3]="images/backgrounds/friends.jpg"; backgroundImages[4]="images/backgrounds/tigers.jpg"; onload=function(){ var e=(document.getElementById)?document.getElementById("myTableId"):(document.all)?document.all.myTableId:(document.layers)?document.myTableId:null; if(!e)return true; e.style.backgroundImage="url("+backgroundImages[Math.floor(Math.random()*backgroundImages.length)]+")"; } //--></script> and here is how I am calling the elements inside of the table: Code: <table cellpadding="1" cellspacing="0" border="0"> <tr> <td id="myTableId" width="302" height="422"> <a href="http://www.meachaverse.com/" target="_blank">meachaverse</a><br /> <a href="http://www.mittnmusic.com/" target="_blank">mittnmusic</a><br /> <a href="http://worldbycarey.blogspot.com/" target="_blank">worldbycarey</a><br /> <a href="http://www.certaingravity.com" target="_blank">certaingravity</a><br /> </td> <td id="myTableId" width="302" height="422"> <a href="http://www.meachaverse.com/" target="_blank">meachaverse</a><br /> <a href="http://www.mittnmusic.com/" target="_blank">mittnmusic</a><br /> <a href="http://worldbycarey.blogspot.com/" target="_blank">worldbycarey</a><br /> <a href="http://www.certaingravity.com" target="_blank">certaingravity</a><br /> </td> ANY Help with this would be much appreciated!!! The site is http://davenport80.comli.com I'm completely new to Java Script, but about a year ago I decided to learn how to build a website from scratch. I am confident with HTML and CSS, but Java seems to be flying over my head. Could anybody possibly help me with my coding? I'm sure the problem is obvious, but I don't know if this is the right place to post this sort of beginnier question. So if it is not, please redirect me to where I can. Thanks a lot! Quote: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title></title> </head> <body> <script type="text/javascript"> function addzero(zero) { return zero; } var d = new Date(); var time=d.getHours function tod1 () { document.write("The time is "); document.write(addzero(d.getHours())); document.write(":"); document.write(addzero(d.getMinutes())); } function tod2 () { document.write("The time is "); document.write(addzero(d.getHours()+1)); document.write(":"); document.write(addzero(d.getMinutes())); } function tod3 () { document.write("The time is "); document.write(addzero(d.getHours()+2)); document.write(":"); document.write(addzero(d.getMinutes())); } function tod4 () { document.write("The time is "); document.write(addzero(d.getHours()+3)); document.write(":"); document.write(addzero(d.getMinutes())); } if (time>10) { alert("Good morning"); } </script> <p id="city"></p> <form name="form" action="wtf.php" method="post"> Vancouver: <input type="radio" name="city" id="Vancouver" onchange="tod1()"> Calgary: <input type="radio" name="city" id="Calgary" onchange="tod2()"> Winnipeg: <input type="radio" name="city" id="Winnipeg" onchange="tod3()"> Toronto: <input type="radio" name="city" id="Toronto" onchange="tod4()"> </form> </body> </html> hey , i got 2 function , the one working and the other one is'nt heres the functions : Code: var toDisplay = "f"; function human(){ var toAdd = toDisplay.substring(0,1); setTimeout(human , 500); document.getElementById('box').innerHTML += toAdd; } human(); // works (display "f" every half a sec) function human2(toDisplay2){ var toAdd = toDisplay2.substring(0,1); var t = setTimeout("human2(toDisplay2)" , 500); document.getElementById('box').innerHTML += toAdd; } human2("dsd"); // not working (only display "d" and stop) the first function works ( keep printing "f" every 0.5 sec ) the second function only work once and than stop ( print "d" and than stop ) what's the problem with the second function? thanks , Mor. hey all, what it says in the title, this block of code wont work and i dont know why. the first prompt box appears but not the "can vote, but can't drink" reply. can anyone offer any ideas? <!DOCTYPE html> <html> <head> <title>legal age</title> <script type="text/javascript"> var your_age = prompt("how old are you?"); if ((age > 18) && (age < 21)) { document.writeln("can vote, but can't drink."); } </script> </body> </html> kind regards, Redd . Just wondering if it's possible to prevent a page displaying until the content is fully loaded. I have a form with a load of check boxes that reloads itself on each user click and it would be nice to smooth things out a little, e.g. hold a screenshot of the page until the reload is complete and then instantly show that one. Stupid question? Cheers, Nick I'm trying to get a drop down box to change the image i've managed to get it working for one but can't seem to get it working when both scripts are on. any help would be much appreciated! http://humza-productions.co.uk/test/ this is the code i'm using, it's for the baseball jacket one but the one that's working live on the website is currently working for the hoodie Code: <script type="text/javascript"> window.onload=function() { bp='images/', //base url of your images imgnum=3, //Number of your images. This should match on your comboboxes options. thumb=document.getElementById('sho1'), //id of your image that will be changing combobox=document.getElementsByName('os1')[0]; // id of your combobox. combobox.onchange=function() { thumb.src=bp+'shop'+this.value+'.png'; } } </script> Code below is not working...nothing happens on clicking submit...javascript is enabled in browser..help please. Code: <html> <head> <script type="text/javascript"> function match() { var aa=document.getElementById("username").Value; var bb=document.getElementById("password").Value; if(aa==null || bb==null) { alert("Enter Again"); } else if((aa=="admin") && (bb=="12345")) { Alert("Hello Sir"); } else if((aa=="guest") && (bb=="67890")) { Alert("Hello Guest"); } else { Alert("Enter Valid Info"); } } </script> </head> <body> Username:<input type="text" id="username"/><br/> Password:<input type="text" id="password"/><br/> <input type="submit" onClick="match()"/> </body> </html> Hi guys my friend has created a game where there are four boxes each numbered from one to four. When you click on these boxes you either get a tick or a cross. In every turn 3 boxes will have ticks and one will have a cross and the aim is to get as many ticks as possible (each tick gets you a point and when you come across a cross your points are all deleted). Anyway i was wondering if theres a way to guess which box will have a cross beforehand. He claims its random but i wanted to make sure. heres the javascript: var spath; var failbox; var score; var pushnumber; var clickedEl; var clickedElT; var waitEvent = 1; function losegameget() { waitEvent = 1; $(".games3of4 > .box > div").each(function (boxli) { jQuery(this).removeClass("check"); jQuery(this).removeClass("check2"); jQuery(this).removeClass("heart"); jQuery(this).removeClass("heart2") }); jQuery(".savegame").css("visibility", "hidden"); $(".asama").find("span").html("0"); jQuery(clickedEl).removeClass("heart"); jQuery(clickedEl).removeClass("heart2"); $(".losebox").css("display", "block"); $(".box").css("display", "none"); jQuery.get("/game1of3"); jQuery.get("/game1of3?score=1", function (json) { var jsonall; eval("jsonall = " + json + ";"); jQuery("#scoreliste").html(""); for (var i = 0; i < jsonall.length; i++) { jQuery("#scoreliste").append(jQuery('<li><div class="order">' + (i + 1) + "</div> " + jsonall[i]["username"] + " <span>(" + jsonall[i]["score"] + ")</span></li>")) } }); } function gameget() { var dd = $(".asama").find("span").text(); if (dd == "0") { $(".asama").find("span").text(0); } score = eval($(".asama").find("span").text()); $(".asama").find("span").empty().html(score + 1); $(".games3of4 > .box > div").each(function (boxli) { jQuery(this).removeClass("check"); jQuery(this).removeClass("check2"); }); waitEvent = 1; } function wgame() { waitEvent = 0; $(".games3of4 > .box > div").each(function (a) { jQuery(this).removeClass("check"); jQuery(this).removeClass("check2"); }); if (parseInt(jQuery(clickedEl).attr("rel")) == 1 || parseInt(jQuery(clickedEl).attr("rel")) == 2) { jQuery(clickedEl).addClass("check") } if (parseInt(jQuery(clickedEl).attr("rel")) == 3 || parseInt(jQuery(clickedEl).attr("rel")) == 4) { jQuery(clickedEl).addClass("check2") } setTimeout("gameget();", 200); } function losegame() { waitEvent = 0; $(".games3of4 > .box > div").each(function (a) { jQuery(this).removeClass("check"); jQuery(this).removeClass("check2"); jQuery(this).removeClass("heart"); jQuery(this).removeClass("heart2"); }); if (parseInt(jQuery(clickedEl).attr("rel")) == 1 || parseInt(jQuery(clickedEl).attr("rel")) == 2) { jQuery(clickedEl).addClass("heart"); } if (parseInt(jQuery(clickedEl).attr("rel")) == 3 || parseInt(jQuery(clickedEl).attr("rel")) == 4) { jQuery(clickedEl).addClass("heart2"); } setTimeout("losegameget();", 400); } function ifagain() { jQuery(".box").hide(); jQuery(".savegame").hide(); jQuery(".asama").hide(); jQuery("#againcall").show(); jQuery(".yes").click(function () { jQuery.get("/game1of3?start=1", function () { jQuery(".box").show(); jQuery("#againcall").hide(); jQuery(".savegame").css("visibility", "visible"); jQuery(".asama").show(); }) }) } function playSound(a) {} jQuery.jQueryRandom = 0; jQuery.extend(jQuery.expr[":"], { random: function (c, d, b, e) { if (d == 0) { jQuery.jQueryRandom = Math.floor(Math.random() * e.length) } return d == jQuery.jQueryRandom; } }); function countGet() { jQuery.get("/game1of3?count=1", function (a) { jQuery("#defa").html(a + " Defa Oynandı<br />"); }) } $(document).ready(function () { setInterval("countGet();", 20000); jQuery(".savegame").click(function () { if (confirm("Puanınızı kaydetmek istediğinizden emin misiniz ?")) { jQuery.get("/game1of3?save=1", function () { jQuery(".box").hide(); jQuery("#saved").show(); jQuery(".boxaga").show(); jQuery(".savegame").css("visibility", "hidden"); $(".highpoint").find("b").html($(".asama").find("span").text()); $(".asama").find("span").html("0"); }) } }); z = 0; $(".games3of4 > .box > div").each(function (boxli) { $(this).click(function () { if (waitEvent) { clickedEl = this; clickedElT = jQuery(this).attr("rel"); jQuery.get("/game1of3?res=" + jQuery(this).attr("rel"), function (data) { if (data == 'umustbelogin') { window.location.href = '/uye/giris?&redirect_to=/oyun'; } else { var r; r = (data.indexOf("true") != -1); } if (r) { wgame(); } else { losegame(); } }) } }); }); $(".try").click(function () { $(".losebox").css("display", "none"); $(".box").css("display", "block"); jQuery(".savegame").css("visibility", "visible"); }); $(".try2").click(function () { $(".boxaga").css("display", "none"); $(".box").css("display", "block"); jQuery("#saved").hide(); jQuery(".savegame").css("visibility", "visible"); }); $.playgame = function (kcode) { score = eval($(".score").find("span").text()); if (kcode == 49) { pushnumber = 1 } if (kcode == 50) { pushnumber = 2 } if (kcode == 51) { pushnumber = 3 } if (kcode == 52) { pushnumber = 4 } clickedEl = $(".gamecontent li")[pushnumber - 1]; clickedElT = pushnumber; jQuery.get("/game1of3?res=" + pushnumber, function (data) { score = eval($(".score").find("span").text()); var r = eval(data); if (r) { wgame(); } else { losegame(); } }) }; jQuery.get("/game1of3"); }); cheers! Hey guys, Im kind of a newb and i need help with this dice game im trying to build to help me learn javascript. If you open up the code up in your browser and click the roll button, it will clear everything and write var a in the top left corner. What i am trying to do is write the var a into the text box. any suggestions?? [CODE] <html> <head> <script type="text/javascript"> </script> <style type="text/css"> body { background-image: url(http://projectraw.files.wordpress.com/2010/02/background_brick_wall.jpg); } h1 { font-family:"sans-serif",tahoma; background-repeat: no-repeat; color:white; } p { color:white; font-family:"sans-serif",tahoma; font-weight:900; } </style> </head> <body> <center><h1>Ghetto Dice Project</h1></center> <center> <p> Hand coded with care by Tanner Beck </p> </br> </br> </br> </br> </br> </br> </br> </br> </br> </br> <p> <center> <table BGCOLOR="#888888" BORDER="3" CELLPADDING="5"> <tr> <input type="text" name="number" size="4" value=a> </tr> </br> <tr> <button onclick=" a=(Math.floor(Math.random()*13)); document.write(a)">ROLL</button> </tr> </table> </br> </center> </p> </body> </html> [CODE] Hi all, Can some body help me i need a textbox and submit button.when i enter date in text box and click on submit button.Then my chart should display by passing my date(dynamic) through the code. how to design and code. Thanks.. Hi, Which is the difference between to use "<!-- //-->" inside the script or not? Quote: <script language=JavaScript> <!-- function stopError() { return true; } window.onerror = stopError; // --> </script> Quote: <script language=JavaScript> function stopError() { return true; } window.onerror = stopError; </script> Any advice is welcome!! stickers Hello to all. I need someone to help me with making code for some page, because I don't know lot about coding. What I want is to this script work only when someone click on text like "Start script", not when someone open page where this script is. Can someone help me with that? Thanks a lot. Quote: <script type="text/javascript"> var win = window.open("http://www.mysite.com/", "mywindow"); var interval; function closePopup() { win.close(); clearInterval(interval); } interval=setInterval(closePopup,10000); </script> Hi everyone hope all well. I need your expertise. I have a problem with the email part of this javascript. Everything is working fine except for It will not validate when i add a period (.) before the @ sign. I am wanting to be able to put in an email like this abc.def@gmail.com or abc+def@gmail.com Here is the code for you to look at Code: <script type="text/javascript"> function validate_form() { if (!ValidatePhoneNumber(document.second.HomePhone.value)) { return false; } if(!ValidateZip(document.second.ZipCode.value)) { return false; } if ( document.second.degreeLevel.selectedIndex == 0 ) { alert ( "Please select degree level" ); return false; } if ( document.second.ProgramInterest.selectedIndex == 0 ) { alert ( "Please select area of study" ); return false; } if ( document.second.LevelofEducationCompleted.selectedIndex == 0 ) { alert ( "Please select level of education" ); return false; } if ( document.second.FirstName.value == '' ) { alert ( "Please Enter a First Name" ); return false; } if ( document.second.LastName.value == '' ) { alert ( "Please Enter a Last Name" ); return false; } if ( document.second.Address.value == '' ) { alert ( "Please Enter a Address" ); return false; } if ( document.second.City.value == '' ) { alert ( "Please Enter a City" ); return false; } if ( document.second.State.selectedIndex == 0 ) { alert ( "Please Select a State" ); return false; } if(!ValidateName(document.second.FirstName.value)) { return false; } if(!ValidateName(document.second.LastName.value)) { return false; } function ValidatePhoneNumber(field) { var valid = "0123456789"; var hyphencount = 0; if (field.length != 10) { alert("Please enter your 10 digits phone."); return false; } for (var i = 0; i < field.length; i++) { temp = "" + field.substring(i, i + 1); if (valid.indexOf(temp) == "-1") { alert("Invalid characters in your phone. Please try again."); return false; } } return true; } if(!EmailValid(document.second.Email.value)) { return false; } function ValidateZip(field) { var valid = "0123456789"; var hyphencount = 0; if (field.length!=5 ) { alert("Please enter your 5 digit zip code."); return false; } for (var i=0; i < field.length; i++) { temp = "" + field.substring(i, i+1); if (valid.indexOf(temp) == "-1") { alert("Invalid characters in your zip code. Please try again."); return false; } } return true; } function ValidateName(field) { var invalid="0123456789()-+=@#$%^&*!~`{}][|:;<>,?/"; for (var i=0; i < field.length; i++) { temp = "" + field.substring(i, i+1); if (invalid.indexOf(temp) != "-1") { alert("Invalid characters in your name field. Please try again."); return false; } } return true; } function EmailValid(email) { if(email=="") { alert("Email is required field!") return false } len = email.length if((email.charAt(1)=='.')||(email.charAt(1)=='@')||(email.charAt(1)=='.')) { alert("Invalid Email Please try again!") return false } if((email.charAt(len-2)=='@')||(email.charAt(len-2)=='.')) { alert("Invalid Email Please try again!") return false } count=0 dotcount=0 for (i=0; i< email.length; i++) { if(email.charAt(i)=='@') count++ if(email.charAt(i)=='.') dotcount++ } if((count !=1)||(dotcount !=1)) { alert("Invalid Email Please try again!") return false } return true } } </script> Im sure it is something small. i have tried changing things around but it will not work for me. Any help would be great. Thanks everyone Nim Code: <script type="text/javascript"> var aURL = "http://xmegatop100.com/"; if (aURL == http://xmegatop100.com/) { document.write("<p style="text-align: right;"> <a href="{$list_url}/index.php">1-50</a> | <a href="{$list_url}/index.php?start=51">50-100</a> | <a href="{$list_url}/index.php?start=101">100-150</a> | <a href="{$list_url}/index.php?start=151">150-200</a></p> <br><br> "); } else { document.write("<p style="text-align: right;"> <a href="{$list_url}/index.php?cat={$category_url}&start=1">1-50</a> | <a href="{$list_url}/index.php?cat={$category_url}&start=51">50-100</a> | <a href="{$list_url}/index.php?cat={$category_url}&start=101">100-150</a> | <a href="{$list_url}/index.php?cat={$category_url}&start=151">150-200</a></p> <br><br> "); } </script> What im trying to do is if i have url as http://mysite.com then read1 code , if my site has http://mysite.com/index.php?cat=~~~~ Then reads the else part.. am i doing something wrong? this doesnt work.. Ok this is supposed to be a slot machine that works when I click the "Slot" button. If all the images match, then it is supposed to say "Congratulations...". If all the images do not match, then it is supposed to say "Sorry, you lose....". For one thing, I want the images to load after I hit the slot button and not when I refresh the page. Also, I've screwed up somewhere and I think I need another function option but I don't know where to put it or what to do. And last, my if, else statement isn't working. I'm pretty much new to Javascript and I don't know if the way I assigned the images to variables is even correct. Someone please help me. It would greatly appreciated. PHP Code: <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title> Slot Machine</title> <style type = "text/css"> table { width: 45em } th { text-align: left } th { text-align: center } th { text-align: right } div.red { color: red } </style> <script type = "text/javascript"> <!-- var pictures = [ "star", "blueSeven", "berry" ]; var pic1; var pic2; var pic3; pic1 = document.write ( "<img src = \"" + pictures[ Math.floor( Math.random() * 3 ) ] + ".gif\" />" ); pic2 = document.write ( "<img src = \"" + pictures[ Math.floor( Math.random() * 3 ) ] + ".gif\" />" ); pic3 = document.write ( "<img src = \"" + pictures[ Math.floor( Math.random() * 3 ) ] + ".gif\" />" ); function play() { var statusDiv = document.getElementById( "status" ); if ( pic1 = pic2 ) { if ( pic2 = pic3 ) statusDiv.innerHTML = "Congratulations, you win!"; } else statusDiv.innerHTML = "Sorry, you lose. " + "Please try again."; } </script> </head> <body> <form action = ""> <table> <tr><td /><td><input type = "button" value = "Slot" onclick = "play()" /></td></tr> </table> <div id = "status" class = "red"> Click the Slot button to play</div> </form> </body> </html> Hello i have problem is i have penny auction script and i try to add auction and it show on indexpage assume 05-05-2011 but when the time hit 00.00 so date become to 6 and back to 5 in the morning maybe 12 hour and i try to change var.match round to var math.floor date become to 4 before midnight 2 minute and back to 5 when the time hit midnight again...so if this day is 5 and before midnight it will not become to 4 but when midnight come it will become to 6...so i dont know when item can end then this is code if someone can sort it out function calc_counter_from_time22(diff) { if (diff > 0) { hours=Math.floor(diff / 3600) minutes=Math.floor((diff / 3600 - hours) * 60) seconds=Math.round((((diff / 3600 - hours) * 60) - minutes) * 60) } else { hours = 0; minutes = 0; seconds = 0; } if(diff < 86400){ return twodigit(hours) + ":" + twodigit(minutes) + ":" + twodigit(seconds); } else{ var Tday = Math.floor(diff / (60 * 60 * 24)); var addDay = Tday; var d = new Date(); d.setDate(d.getDate()+addDay); mkMonth=d.getMonth()+1; mkMonth=new String(mkMonth); if(mkMonth.length==1){ mkMonth="0"+mkMonth; } mkDay=d.getDate(); mkDay=new String(mkDay); if(mkDay.length==1){ mkDay="0"+mkDay; } mkYear=d.getFullYear(); return mkDay+"-"+mkMonth+"-"+mkYear; } I have written the code below myself and im trying to figure out if this is the outcome in a web browser => 0 1 2 3 4 5 6 7 8 9 if not what would be the outcome? <script language=javascript type="text/javascript"> for (i=0 ;i<10 ;i++) { document.write(i) } </script> and how would you modify this code so it prints only even numbers and how would you modify it so that it sums all values of i and prints the final sum? Hi there, I'm sure someone can help me with this simple fix. I am putting a site together for a friend and I found a Javascript code that I'm using which basically causes an image to enlarge on mouse rollover. The website, which I just started, is: Home 2 What I'm trying to do is get the larger image to appear a little more to the right than it currently does, so it is not right on top of the thumbnails. I hope someone can tell me what code (and where) I need to add to accomplish this. I'm quite new at this so I really need specific instruction. Thanks in advance for your help! Here is the code for the onmouseover routine: Code: <head> <script language="JavaScript"> function showlargeimage(imgshow) {document.getElementById('image').src=imgshow;} function showlargeimage(imgshow) {document.getElementById('image').src=imgshow; document.getElementById('image').style.display='block'; } </script> </head> <body> <TABLE> <TR> <TD> <!--THUMBNAILS--> <img src="thumbnail1.jpg" onmouseover=showlargeimage('image1.jpg')><br> <br> <img src="thumbnail2.jpg" onmouseover=showlargeimage('image2.jpg')><br> <br> <img src="thumbnail3.jpg" onmouseover=showlargeimage('image3.jpg')><br> <br> <img src="thumbnail4.jpg" onmouseover=showlargeimage('image4.jpg')><br> <br> <img src="thumbnail5.jpg" onmouseover=showlargeimage('image5.jpg')><br> <br> </TD> <TD> <!--image SCREEN--> <img src='#' id='image'> <img src='#' id='image' style='display:none'> </TD> </TR> </TABLE> </body> I am creating a web/shopping cart using Big Commerce. I am not a programer so I need help creating a code for the following: a.- PRICING DISOCOUNTS - The variations features allows for setting prices for diferent size, colors, etc. but will not allow for price discounts. Meaning if you buy 1 ea the price is $10.00 ea 2 $ 8.00 ea or 5 or more $ 7.00 ea. We sell health supplements so Price Discounts are important. Tech support said I needed a simple java cript code written. Need to give a set $$ discount or % discount to all products or individually as required. Can anyone help? I just started a small business but I am willing to pay some for quick delivery. Thank you very much. J.C. Hi guys, as you can see i am newbie.. So ive been working with javascipt and html for about 2 days now. What im trying to do it make a really annoying website kind of like www.mudkipz.ws [go at your own risk], the site is a youtube video of mudkip pokemon that are really annoying they just say Mud-kip for about 9 minutes.. once you try to exit, messages pop up saying "Mud" And "Kip" After Clicking "ok" Its a Loop That goes on for ever! im trying to make something like this on dreamweaver but i have very little experience! Does anyone know how i could be able to make it so it can say [ "hahah i got you!" | |"Only way to exit is by going to this link" | | "Link" | |___________[ok]____________________ | Edit: I got the exit pop up message to work, now i just need the loop code! Any idea of how to put a link in the exit pop up message? |