JavaScript - How Do I Keep A Simple Tally With Js?
I have very limited understanding of programming, but I want to do something with javascript in the browser and don't know how to go about it. I know it could be done in C or some other language, but I have even less experience with that, so I want to see if I can do it in the browser.
I have a questionnaire that the respondents filled out by hand, and I have to tally the results. Rather than go through and tally up the results for each question by hand on paper, I'd rather just be able to punch the values for the answers (the questions are "worst to best; 1-5" type responses) on the 10-key, have it add 1 to the appropriate box for each question, move to the next question, wait for my next entry of 1-5, and start back at the beginning again when I'm finished inputting answers for all the questions. I have an idea that there'd be 5 boxes per question for the tallied results and a box alongside each of those for entry of the answer. If you input "1" in that box, it'd add 1 to the first box; if you hit "2," it'd add 1 to the second box; if you hit "3," it'd add 1 to the third box, etc. I know this probably requires onKeyDown or onKeyUp to get the value of the answer, but I'm not sure how to get values captured from onKeyDown/Up through the javascript and back into the appropriate boxes. I'm not sure if I need an if...then conditional in the javascript or if it can be done some other way. Anyway, can anyone post some simple, sample code so I can get this going for at least one question and then I can scale it up from there? Thank you! Similar TutorialsThis script is supposed to tally the score of the questions. It shows up fine but it does not tally the score <p>You are on a business journey beyond traditional small business style <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You don t want to be the glue holding everyday operations together <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You are comfortable with using simple business technology tools and the web <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You believe in business operations based upon processes <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You earn operating success by having a good working team <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>One of your high priorities is designing and evolving your business progressively <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>Your company culture embraces adopting the best approaches <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You have defined processes, roles, and responsibilities <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>Your staff is literate in using a computer for your basic on the job tasks <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You are ready to begin implementing more systematic operations <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You want to expand, grow, or diversify more efficiently <input type="checkbox" value="1" name="Q2">yes <input type="checkbox" value="0" name="Q2">no</p> <p>You effectively communicate the reasons and value of your changes <input type="checkbox" value="1" name="Q3">yes <input type="checkbox" value="0" name="Q3">no</p> <p>You want to adopt changes to smooth out basic team processes <input type="checkbox" value="1" name="Q3">yes <input type="checkbox" value="0" name="Q3">no</p> <p>Your key people will support, advocate, and lead in changes for you <input type="checkbox" value="1" name="Q3">yes <input type="checkbox" value="0" name="Q3">no</p> <p>You view change as a prime mover in your business journey <input type="checkbox" value="1" name="Q3">yes <input type="checkbox" value="0" name="Q3">no</p> <p><input type="text" name="tally" size="5"></p> <p><input type="button" value="tally" name="B1"></p> I imagine this would be very simple for someone who knows javascript. I want to have three fields. First field is "posted speed limit", second field is "actual speed" and third field will be the output field. All the script needs to do it subtract the posted speed from the actual speed and add a ZERO to the end; which is the amount of the speeding ticket. The minimum fine is $100, however. So, 5 miles over the speed limit would be $100 (minimum value) 15 miles over the speed limit would be $150 (add a zero) 35 miles over the speed limit would be $350. etc. I know very little Javascript, if anyone could help me out with this, I'd appreciate it. Thanks, Sean Hello, Below is my Javascript, CSS and HTML code for the navigation menu on http://033691f.netsolhost.com/stnew/ -- a test site for my company. Note: I did not write the Javascript code nor do I know how to write javascript. I take no credit. When the page first opens, the navigation shows fully expanded for a second, then collapses all. I would like to cut out the expanded view if possible and have the page load with the menu fully collapsed. Is there any way that would work? Thank you in advance for any input! Code: function initMenus() { $('ul.menu ul').hide(); $.each($('ul.menu'), function(){ var cookie = $.cookie(this.id); if(cookie === null || String(cookie).length < 1) { $('#' + this.id + '.expandfirst ul:first').show(); } else { $('#' + this.id + ' .' + cookie).next().show(); } }); $('ul.menu li a').click( function() { var checkElement = $(this).next(); var parent = this.parentNode.parentNode.id; if($('#' + parent).hasClass('noaccordion')) { if((String(parent).length > 0) && (String(this.className).length > 0)) { if($(this).next().is(':visible')) { $.cookie(parent, null); } else { $.cookie(parent, this.className); } $(this).next().slideToggle('normal'); } } if((checkElement.is('ul')) && (checkElement.is(':visible'))) { if($('#' + parent).hasClass('collapsible')) { $('#' + parent + ' ul:visible').slideUp('normal'); } return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#' + parent + ' ul:visible').slideUp('normal'); if((String(parent).length > 0) && (String(this.className).length > 0)) { $.cookie(parent, this.className); } checkElement.slideDown('normal'); return false; } } ); } $(document).ready(function() {initMenus();}); Code: <ul id="menu1" class="menu" style="margin-top:20px;"> <li><a class="m0" href="index.php" style="background-color:#222; color:#fff;">HOME</a></li> <li><a class="m1" href="">WHO WE ARE ...</a> <ul><li><a href="">Company Overview</a></li> <li><a href="">Clientele</a></li> <li><a href="">Multimedia</a></li> <li><a href="">Careers</a></li> <li><a href="">Contact Us</a></li> </ul> </li> <li><a class="m1" href="">WHAT WE DO ...</a> <ul><li><a href="">Promotional Products</a></li> <li><a href="">Screen Printing</a></li> <li><a href="">Embroidery</a></li> <li><a href="">Signage</a></li> <li><a href="">Web Design</a></li> </ul> </li> <li><a class="m3" href="">FIND PRODUCTS ...</a> <ul><li><a href="">Web Search</a></li> <li><a href="">Online Catalogs</a></li> </ul> </li> <li><a class="m4" href="">SUPPORT TOPICS ...</a> <ul><li><a href="">General Information</a></li> <li><a href="">Available Brands</a></li> <li><a href="">Artwork Submissions</a></li> <li><a href="">Color & Substrate Charts</a></li> <li><a href="">Dartman Game</a></li> </ul> </li> <li><a class="m5" href="http://www.screentek.net/blog">READ OUR BLOG</a></li> </ul> Code: ul.menu { border-bottom:1px solid #ccc; } ul.menu, ul.menu ul { list-style-type:none; margin: 0; padding: 0; width: 240px; } ul.menu a { display: block; text-decoration: none; } ul.menu li { margin-top: 0px; border-top:1px solid #ccc; font-size:10pt; font-family: Segoe-B; } ul.menu li a { background: #fff; color: #333; padding: 3px 20px; } ul.menu li a:hover { background: #2b76b7; color:#fff; } ul.menu li ul li a { background: #fff; color: #2b76b7; padding-left: 35px; font-size:10pt; font-family: Segoe-R; } ul.menu li ul li a:hover { background: #eee; border-left: 5px #000 solid; padding-left: 25px; color:#333; } .code { border: 1px solid #ccc; list-style-type: decimal-leading-zero; padding: 5px; margin: 0; } .code code { display: block; padding: 3px; margin-bottom: 0; } .code li { background: #ddd; border: 1px solid #ccc; margin: 0 0 2px 2.2em; } .indent1 { padding-left: 1em; } .indent2 { padding-left: 2em; } .indent3 { padding-left: 3em; } .indent4 { padding-left: 4em; } .indent5 { padding-left: 5em; } Hi, Im trying to make an imacro/javascript script that checks a webpage for names, and if either of the names are found, i want the script to alert me, if not, continue looping/reloading the page. Im not at all good with javascript, imacro is more sort of my thing, however what i do have, doesnt seem to do anything. var links = document.getElementsByTagName('a'); for (var i in links){ if (links[i].value == "Simon" || links[i].value == "James"){ alert("ATTENTION"); } } i dont know if its something simple i'm missing, or whether im nowhere near, but ive spent all day trying to do this, and lost all patience. Any suggestion/fixes? Hi Folks, I've been trying to learn Javascript, I'm fluent with CSS, HTML and not to bad with jQuery and PHP. But I've been trying to learn the core fundamentals of JavaScript. Basically, I have a friend who has a strange take on the English language, so I wanted to make him a translator, so that you could input one of his misspellings and it would bring up the proper word. <html> <head> <script type="text/javascript" src="js/modernizr.js"></script> <script type="text/javascript"> // Mox spellings function checkMox () { var bm = document.forms["transMox"]["mox"].value; if (bm == "wid") { document.write("wid = with"); } else { document.write("Please enter a Moxism"); } }; </script> </head> <body> <header> <div id="title"> <h1>I drink!</h1> <h2>Therefor I am...</h2> </div> <nav> <ul> <li>The history of Moxisms</li> <li>Examples of Moxisms</li> <li>The man himself...</li> </ul> </nav> </header> <h3>Welcome to the Big Mox translator</h3> <form id="transMox" action="#output" method="post" onsubmit="return checkMox()"> <input type="text" id="mox">Enter a Moxism</input> <br /> <input type="submit" id="submit" onSubmit="checkMox();">G0!</input> </form> <div id="output"> </div> </body> </html> Obviously that's just for one word, so I wondered how to structure more words into an array or something? Anyway, cheers in advance for the help guys! 1. I want to make form with 2 select filds that one of them will be disabled if in the first the use choose a specific option i wrote it in this way (but its not work) how I fix it? Code: <script type="text/javascript"> function itay() { if (document.some1.one.value="x") document.some1.two.disabled=true if (document.some1.one.value="y") document.some1.two.disabled=false } </script> </head> <body bgcolor="#FFFFFF"> <form name="some1"> <table> <tr> <td> <select id="one" onclick="itay()"> <option value="x">x</option> <option value="y">y</option> </select> </td> <td> <select id="two"> <option value="a">a</option> <option value="b">b</option> </select> </td> </tr> </table> </form> 2. I want that after u fill the form and press submit u will see a txtarea with all the options u selected (for confirm that you chose the right things) and then press submit agien and get all the things u saw in the txtarea to a Email. (Hope u understand ) so how I do it? I have been having problems adding checkboxes and option selects in the same function.. Here's what I have. Code: <script type="text/javascript"> function bonuscalc() { var aaaa = document.getElementById("aaaa").value; var bbbb = document.getElementById("bbbb").value; var cccc = document.getElementById("cccc").value; if (dddd.checked){ var dddd = document.dddd.value = 2; } else { var dddd = document.dddd.value = 1; } var eeee = document.getElementById("eeee").value; var bonus = aaaa* bbbb * dddd * cccc * eeee; var roundbonus = Math.round(bonus*10)/10; document.getElementById("roundbonus").value = roundbonus; } </script> Javascript first.. The part I'm not sure about is the if/else part for checbox. Now the html: Code: <form action="" id="calc1"> <table width="100%"> <tbody> <tr> <td>A status: <select id="aaaa"> <option value="1.1">A1</option> <option value="1.02">A2</option> <option value="1">A3</option> <option value="0.95">A4</option> </select> </td> <td>B status: <select id="bbbb"> <option value="1">0%</option> <option value="0.99">1%</option> <option value="0.98">2%</option> <option value="0.97">3%</option> <option value="0.96">4%</option> <option value="0.95">5%</option> <option value="0.94">6%</option> <option value="0.93">7%</option> <option value="0.92">8%</option> <option value="0.91">9%</option> <option value="0.90">10%</option> </select> </td> <td>E status:<input id="eeee" type="text" /> </td> <td>D status: <input id="dddd" name="dddd" type="checkbox"> </td> <td>C status: <select id="cccc"> <option value="1">No</option> <option value="1.2">Yes</option> </select> </td> </tr> <tr> <td width="100%"> <input type="button" value="Submit" onclick="bonuscalc()" /> <br /> Result: <input type="text" readonly="readonly" id="roundbonus" /> </td> </tr> </tbody> </table> </form> I hope it's not too confusing. The idea is to assign value 2 if the checkbox is checked and value 1 is it isn't.. Im new to JavaScript so take it steady, i have an array: <script type="text/javascript"> var colOne [0] = new Array("Copyright", "Council - spending plans - consultation", "Data protection"); var colTwo [1] = new Array("Digital Region", "Freedom of information", "Libraries - online information resources"); var colThree [2] = new Array("Our standards", "Test"}; document.write(colOne[0]); </script> anyone can tell why it does not work? I am trying to use document.get to change the style of a class. The CSS is: PHP Code: .jewelToggler{background:no-repeat url(/rsrc.php/z7VU4/hash/66ad7upf.png);display:inline-block;height:31px;position:absolute;text-decoration:none;width:24px} and the HTML is such: PHP Code: <a class="jewelToggler" id="jewelRequest" title="Friend requests" href="http://www.facebook.com/reqs.php" onclick="var toggle = function() {this.onclick = function(e) {e = e || window.event;e && Event.prevent(e);Jewel.toggle(this, "[fb]requests");}.bind(this);this.onclick();}.bind(this);this.onclick = function() {CSS.toggleClass(this.parentNode, 'openToggler');return false;}.bind(this);this.onclick();onloadRegister(toggle);return false;" accesskey="3"><span class="jewelCount"><span id="jewelRequestCount">0</span></span></a> mainly focusing on [a class="jewelToggler"] So naturally I assumed that his javascript would work: PHP Code: document.getElementById('jewelToggler').getElementsByTagName("a")[0].style.backgroundImage="url('myimgurl')"; But it doesn't change anything. Comments? Ideas? Thanks. How would I add up a array of numbers in a function? My numbers keep getting written as strings, instead of adding onto each other. I am a beginner. function (myNumbers) { var number = [6,9,10,13,14]; var total = 0; for(var total=0; total < number.length; total = total + 1) { total = total + number; document.write(total); } } myNumbers(); This is just an excercise. hi guys i am pretty new to javascript and i'm having trouble with this code: Code: <HTML> <HEAD> <TITLE></TITLE> <SCRIPT LANGUAGE = "JAVASCRIPT"> var recipient; // Declare other variables here recipient = window.prompt('Please enter the name of the recipient', ''); // Prompt for other values here // Output the customised greeting here </SCRIPT> </HEAD> <BODY> </BODY> </HTML> What I need it to do is pop up with 3 input boxes. 1 for the reciever, 1 for the occasion (e.g. birthday ect) and another from the sender. and i need to be able to show it in the browser too. I'm brand new to javascript and have a simple assignment that I'm stuck on. I would appreciate any help. Here's what I want: 0:0 1:1 2:3 3:6 4:10 5:15 As you can see, I want the numbers after the colon to be a sum of the number to the left and the number above it. I can easily get the number before the colon, but not sure how to get the sum (the number after the semicolon). Here's my code so far: <html> <body> <script type="text/javascript"> N=0; while (N<=5) { document.write(+ N); N++; document.write(":"); document.write("<br />"); } </script> </body> </html> I need to use a loop, hence the "while" loop. But not sure how to set up variables to do the addition. Thanks much for any help - as you can see, I'm not a programmer. Hello! I have a script that prints a DIV and I am looking to set the font for the generated page, and the font color and size. But for the life of me, I cannot figure out if it can be done in this script, or if I have to setup a separate print.css. Here is my script: Code: <script type="text/javascript"> function PrintDiv_print_all() { var divToPrint = document.getElementById('print_all'); var popupWin = window.open('', '_blank', 'width=600,height=800,scrollbars=yes'); popupWin.document.open(); popupWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</html>'); popupWin.document.close(); } </script> I am still learning this stuff and any help is appreciated! Hello all, I have a translation script that I want to modify to use select boxes instead of divs, but I have a little problem with what I have. Bascially, the user selects an option and it changes the text in between the ' ' (VALUE) to whatever the value of the option is: Code: <select onchange="updateLangTo('VALUE')"> <option value="en">English</option> <option value="ar">Arabic</option> </select> So how would JavaScript be able to accomplish this? ok i am trying to make a countdown timer from 20 seconds when i click start where am i going wrong with this Code: <html> <head> </head> <body> <script type="text/javascript"> function timer() { var milisec=0 var seconds=20 document.counter.d2.value=20 function display() { if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) display() }} </script> <form name="counter"> <center> Text Timer<br> <input type="text" size="30" name="d2"> <br> <input type="button" onclick="timer()" value="click me to start"> </center> </form> </body> </html> Basically i have an image of a ball that i am trying to make bounce from top to bottom so far it is just going to the bottom and stopping plz help thanks <head> <title></title> </head> <body> <center> <input type="button" value="Click" onClick="moveDown()"/> </center> <img id="Ball" src="ball.jpg" style="position:absolute; top:100px; left:100px;"/> <script language="JavaScript"> var Image = document.getElementById("Ball"); var Position = 100; var direction = 1; function moveDown() { if(direction > 0) { Image.style.top = parseInt(Image.style.top) + 20+'px'; } if(parseInt(Image.style.top)> 100 || direction > 1 ) direction = 1 if(parseInt(Image.style.top)> 500 || direction < 1 ) { direction = -1 Image.style.top = parseInt(Image.style.top) - 20+'px'; } } setInterval ("moveDown()", 50 ); </script> </body> </html> I'm trying to code a set of buttons that upon being pressed, change an image on the other side of the table in which they're located (not themselves). Is there a way to do this and if so, what would it be? So far I've been trying to use onMouseDown and changeImage with object id tags to get the effect but it's not working. hello coding forums friends please help me i got stuck in sliding a slider that from easyslider. everything is ok when i individually browse from folder see here http://www.sajeebgroup.com/robin/easyslider/slider.php but when i tried to include in a divition in index.php page it do not slide but only one image is show see here right side news update div link is http://www.sajeebgroup.com/ what problem please help me i really going to frustrated to solve this. here is my index.php code with include of easy slide. index.php PHP Code: <?php include 'news/common/connection.php'; ?> <html> <head> <title>Welcome to Sajeeb Group</title> <style> .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 150%; background-color: #000000; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 55%; left: 23%; width: 50%; height: 50%; padding: 16px; border: 16px solid orange; background-color: white; z-index:1002; overflow: auto; } </style> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript" src="swfobject.js"></script> <style type="text/css"> #ticker-container { position:relative; overflow:hidden; width: 170px; height: 200px; padding-top:10px; color:#000000; margin-top:8px; } #ticker { position:relative; width:150px; } </style> <script language="JavaScript"> function openit(link) { var url="./news/newsinfo.php?id="+link; window.open(url,"mywindow","resizable=0,scrollbars=1,height=400,width=400"); } //scroller width var swidth=170; //scroller height var sheight=205; //background color var sbcolor='#ccffff'; //scroller's speed var sspeed=3; var msg='' <?php $str="SELECT * from newsscroll ORDER BY news_id desc"; $res=mysql_query($str) or die("Error in selecting....."); while($dataNews=mysql_fetch_row($res)) { do{ echo "msg+=\"<ul><li><a href=# onclick=openit(\'".$dataNews[0]."\')><font size=2>".$dataNews[1]."</font></a></li><br></ul>\";"; }while($dataNews=mysql_fetch_row($res)); } ?> //End of your messages // Begin the ticker code var resumesspeed=sspeed function start() { if (document.all) iemarquee(ticker); else if (document.getElementById) ns6marquee(document.getElementById('ticker')); } function iemarquee(whichdiv){ iediv=eval(whichdiv) sheight += 50; iediv.style.pixelTop=sheight iediv.innerHTML=msg sizeup=iediv.offsetHeight ieslide() } function ieslide(){ if (iediv.style.pixelTop>=sizeup*(-1)){ iediv.style.pixelTop-=sspeed setTimeout("ieslide()",100) } else{ iediv.style.pixelTop=sheight ieslide() } } function ns6marquee(whichdiv){ ns6div=eval(whichdiv) sheight += 50; ns6div.style.top=sheight + "px"; ns6div.innerHTML=msg sizeup=ns6div.offsetHeight ns6slide() } function ns6slide(){ if (parseInt(ns6div.style.top)>=sizeup*(-1)){ theTop = parseInt(ns6div.style.top)-sspeed ns6div.style.top = theTop + "px"; setTimeout("ns6slide()",100) } else { ns6div.style.top = sheight + "px"; ns6slide() } } </script> <script type="text/javascript" src="swfobject.js"></script> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style type="text/css"> <!-- .gallery { zoom:1; width:520px; } --> </style> <script type="text/javascript">var LightBoxOpt={autoPlay:false}</script> <link rel="stylesheet" href="engine/css/lightbox.css" type="text/css" media="screen" /> <script src="engine/js/prototype.js" type="text/javascript"></script> <script src="engine/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script> <script src="engine/js/lightbox.js" type="text/javascript"></script> <style> .gallery { zoom:1; width:700px; } .gallery a { display: block ; float:center; margin:5px; padding:5px; height: 150px; border:solid 1px #b8b8b8; background-color:#FFFFFF; opacity:0.87; alignment: center; } .gallery a:hover { opacity:1; } .gallery a img { border:none; display:block; } .gallery a#vlightbox{display:none} .gallery1 { zoom:1; width:520px; } .gallery2 { zoom:1; width:520px; } .gallery3 { zoom:1; width:520px; } .gallery4 { zoom:1; width:520px; } .gallery5 { zoom:1; width:520px; } .gallery6 { zoom:1; width:520px; } .gallery7 { zoom:1; width:520px; } .gallery8 { zoom:1; width:520px; } .gallery9 { zoom:1; width:520px; } .gallery10 { zoom:1; width:520px; text-align:center; } .style1 {font-family: Arial, Helvetica, sans-serif} .style3 {font-size: 12px} .gallery11 { zoom:1; width:520px; } .gallery12 { zoom:1; width:520px; } .gallery13 { zoom:1; width:520px; } .gallery14 { zoom:1; width:520px; } .gallery15 {zoom:1; width:520px; } .gallery15 { zoom:1; width:700px; } .gallery111 {zoom:1; } .gallery121 {zoom:1; } .gallery131 {zoom:1; } .gallery1111 {zoom:1; } .gallery1311 {zoom:1; } .gallery13111 {zoom:1; } #link_style { text-decoration:none; color:#000000;} </style> </head> <body background="images/wr_body.gif" 'images/btn%20import%20over.gif','images/btn%20contact%20over.gif','images/btn%20home%20over.gif','images/btn%20link4%20over.gif')"> <div align="center"> <table cellpadding="0" cellspacing="0" width="775" height="107"> <!-- MSTableType="layout" --> <tr> <td valign="top" width="258"> <img border="0" src="images/head logo.gif" width="258" height="107"></td> <td valign="top" height="107" width="517"> <img border="0" src="images/head right.gif" width="517" height="107"></td> </tr> </table> </div> <div align="center"> <table cellpadding="0" cellspacing="0" width="775" height="798"> <!-- MSTableType="layout" --> <tr> <td width="775" height="798" valign="top"> <div id="FlashMenuLabs"> You need to upgrade your Flash Player or to allow javascript to enable Website menu.</br> <a href="http://www.adobe.com/go/getflashplayer">Get Flash Player</a> </div> <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("menu.swf", "menu", "774", "35", "8", "#000000"); so.addParam("wmode", "transparent"); so.addParam("scale", "noscale"); so.addParam("salign", "TL"); so.write("FlashMenuLabs"); // ]]> </script> <table cellpadding="0" cellspacing="0" width="775" height="223"> <!-- MSTableType="layout" --> <tr> <td width="775" height="223" valign="top"> <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="774" height="223"> <param name="movie" value="body anim.swf"> <param name="quality" value="High"> <embed src="body%20anim.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="774" height="223"></object> </td> </tr> </table> <table cellpadding="0" cellspacing="0" width="775" height="232" id="table1"> <!-- MSTableType="layout" --> <tr> <td valign="bottom" background="images/welcome%20bg.gif"> <div align="right"> <table cellpadding="0" cellspacing="0" width="370" height="180"> <!-- MSTableType="layout" --> <tr> <td background="images/welcome%20text%20bg.gif" height="180" width="370"> <div align="center"> <table cellpadding="0" cellspacing="0" width="346" height="159"> <!-- MSTableType="layout" --> <tr> <td width="346" height="159" valign="top" style="text-align:justify;"> <font face="Verdana" size="2" color="#203E59"> </font></td> </tr> </table> </div> </td> </tr> </table> </div> </td> <td></td> <td valign="top" height="230" background="images/news%20bg.gif"> <body onload="start();"> <div id="ticker-container" onmouseover="sspeed=0;" onmouseout="sspeed=resumesspeed"> [COLOR="Red"]here i want to include slide <div id="ticker"> <?php include("robin/easyslider/slider.php"); ?> </div> </div>[/COLOR] </div> </div> </td> </tr> <tr> <td width="563"></td> <td width="3"></td> <td height="2" width="209"></td> </tr> </table> </div> <div align="center"> <table cellpadding="0" cellspacing="0" width="775" height="230" id="table2"> <!-- MSTableType="layout" --> <tr> <td valign="top" background="images/divisions-bg.gif" rowspan="2" width="563"> <div align="center"> <table cellpadding="0" cellspacing="0" width="549" height="169" style="text-align:left;"> <!-- MSTableType="layout" --> <tr > <td valign="top" height="32" colspan="2"> <p style="margin-left: 10px; margin-top: 10px"><b> <font size="2" face="Verdana" color="#203E59">Group Capability</font></b></td> </tr> <tr> <td height="137" width="279" valign="top"> <ul> <li> <p style="margin-top: 6px; margin-bottom: 3px"> <font face="Verdana" size="2" color="#203E59"> <span class="gallery1111"><a href="homepage/sajeeb-group.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Sajeeb Corporation</a></span></font> </li> <li> <p style="margin-top: 6px; margin-bottom: 3px"> <font face="Verdana" size="2" color="#203E59"> <span class="gallery1111"><a href="homepage/sajib-agro.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;" >Sajeeb Agro Limited</a></span></font> </li> <li> <p style="margin-top: 6px; margin-bottom: 3px"> <font face="Verdana" size="2" color="#203E59"> <a href="http://www.ststelecomltd.com/" style="text-decoration: none"> <font color="#203E59">STS Telecom Limited</font></a></font></li> <li> <p style="margin-top: 6px; margin-bottom: 3px"> <font face="Verdana" size="2" color="#203E59"> <span class="gallery1111"><a href="homepage/hashem-auto.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Hashem Auto Rice Mill</a></span></font></li> <li> <p style="margin-top: 6px; margin-bottom: 3px"> <font face="Verdana" size="2" color="#203E59"> <span class="gallery1111"><a href="homepage/chittagong-enamel.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Chittagong Enamel & Aluminium Works Ltd.</a></span></font></li> <li> <p style="margin-top: 6px; margin-bottom: 3px"> <font face="Verdana" size="2" color="#203E59"> <span class="gallery1111"><a href="homepage/sajeeb-industries.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Sajeeb Industrial Corporation</a></span></font></li> </ul> </td> <td height="137" width="270" valign="top"> <ul> <li> <p style="margin-top: 6px; margin-bottom: 2px"> <font size="2" face="Verdana" color="#203E59"> <span class="gallery1111"><a href="homepage/Hasem-foods.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Hashem Foods Limited</a></span></font></li> <li> <p style="margin-top: 6px; margin-bottom: 2px"> <font size="2" face="Verdana" color="#203E59"> <span class="gallery1111"><a href="homepage/sajib-home.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Sajeeb Homes Limited</a></span></font></li> <li> <p style="margin-top: 6px; margin-bottom: 2px"> <font size="2" face="Verdana" color="#203E59"> <span class="gallery1111"><a href="homepage/mermaid.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Mermaid Sweater Ltd.</a></span></font></li> <li> <p style="margin-top: 6px; margin-bottom: 2px"> <font size="2" face="Verdana" color="#203E59"> <a href="http://www.takaful.com.bd/" style="text-decoration: none"> <font color="#203E59">Takaful Islami Insurance Limited </font></a></font></li> <li> <p style="margin-top: 6px; margin-bottom: 2px"> <font size="2" face="Verdana" color="#203E59"><a href="http://www.ststelecomltd.com/" style="text-decoration: none" target="_self"><font color="#203E59">STS Telecommunications (M) Sdn Bhd</font></a></font></li> <li> <p style="margin-top: 6px; margin-bottom: 2px"> <font size="2" face="Verdana" color="#203E59"><a href="http://www.ststelecomltd.com/" style="text-decoration: none" target="_self"><font color="#203E59"> Meghna Insurance Company Ltd. </font></a></font></li> </ul> </td> </tr> </table> </div> </td> <td></td> <td valign="middle" height="115" background="images/message%20bg.gif"> <div align="right"> <table cellpadding="0" cellspacing="0" width="180" height="99"> <!-- MSTableType="layout" --> <tr> <td width="180" height="99" valign="middle"> <p align="justify" style="margin-left: 5px; margin-right: 8px"> <font size="1" face="Verdana" color="#203E59">Welcome you all in the world of �Sajeeb group of Companies� to get the taste of modernization and continuous improvement in the business arena of Bangladesh. (<a href="message.php"><font color="#224562">Read More>></font></a>)</font></td> </tr> </table> </div> </td> </tr> <tr> <td width="3"> <p style="margin-top: 2px; margin-bottom: 2px"></td> <td valign="bottom" height="115" background="images/webmail%20bg.gif" width="209"> <div align="right"> <table cellpadding="0" cellspacing="0" width="180" height="100"> <!-- MSTableType="layout" --> <tr> <td width="180" height="100" valign="middle"> <form method="POST" action="http://sajeebgroup.com:2096/login/" style="text-align:right; padding-right:4px;"> <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --> <p style="margin-left: 5px; margin-right: 3px; margin-top: 2px; margin-bottom: 2px"> <b><font face="Verdana" size="1" color="#203E59"> Email : </font></b> <font color="#203E59"> <input name="user" type="text" id="user" size="12"> </font></p> <p style="margin-left: 5px; margin-right: 3px; margin-top: 2px; margin-bottom: 2px"> <b><font face="Verdana" size="1"> <font color="#203E59">Password:</font> </font></b> <input name="pass" type="password" id="pass" size="12"> <input type="submit" value="Login" name="B1" style="margin-top:2px;"> </p> </form> </td> </tr> </table> </div> </td> </tr> </table> </div> <table cellpadding="0" cellspacing="0" width="775" height="90"> <!-- MSTableType="layout" --> <tr> <td width="775" height="90" valign="middle"> <table cellpadding="0" cellspacing="0" width="775" height="79"> <!-- MSTableType="layout" --> <tr> <td background="images/bottom%20bg%20home.gif" valign="bottom" height="79" width="775"> <table cel Please help if you can. My problem is that i have simple paypal form. When user select 10 accounts then below textbox shows amount to be paid. But when i click at paypal it again multiply with accounts and shows multiple amount at paypal page. For example if you select 10 then amount will be 18.5$ but after clicking at pay button it shows amount at paypal page $185.00 Code: <body> <form name="frm1" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="accounts@freelanceswitch.com"><br /> <strong>How Many Acounts you want</strong> <select name="quantity" onchange="calculate()" id="quantity"> <option value="5">5</option> <option value="10">10</option> <option value="15">15</option> <option value="20">20</option> <option value="25">25</option> <option value="30">30</option> </select> <br /> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="AU"> <input type="hidden" name="bn" value="PP-BuyNowBF"> <input type="hidden" name="return" value="http://net.tutsplus.com/payment-complete/"> <br /> <p>$ <input type="text" name="amount" id="amount" value="0" readonly="readonly"/> <br /> <input type="submit" value="Pay with PayPal!"> </p> </form> <script type="text/javascript"> function calculate (){ ac=document.getElementById('quantity').value; var z=1.85; total =ac*z; document.frm1.amount.value=total; } </script> </body> |