JavaScript - Plz Help!! Txt Value Submittion Through Button
Dear Seniors
I am facing a problem. it entangled me by the last almost three days. actually i am new to programming. i need ur help. what i want to do is that I enter a value in text box and click on submit button. the entered value prompts using alert or prompt function. No further sending of value anywhere. the code is below for HTML and JavaScript. I know i would be making some drastic blunder. plz help me. <form name="mainqryfrm" method="post" action=""> <label></label> <table width="100%" border="0" cellpadding="15"> <tr> <td width="20%"><label><span class="style2">Query Title:</span></label></td> <td colspan="2"><input name="txtqrytitle" type="text" id="txtqryTitle" size="40"></td> </tr> <tr> <tr> <td> </td> <td width="30%"><div align="right"> <input type="submit" name="BtnSubmit" id="button" value="Submit Form" onClick="submitqry(This)"> </div></td> <td width="50%"><input type="reset" name="BtnClrtxt" id="BtnClrtxt" value="Clear Form"></td> </tr> </table> </form> Function submitqry() { var qryfrm; var qrytitle; qryfrm = document.form("mainqryfrm"); qrytitle = document.elements("txtqrytitle").value; document.alert(qrytitle); // return true; } Similar TutorialsHey guys. This is vague because I dont know what exactly to tell you but please reply with me so I can fix this. I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS Hey guys. I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS i'm still a relative noob and this has me stuck - i have a save button with a "save as copy" in the save dropdown list. add new item directs to a premade/formatted project that is used as a template, so on that item i only want/need the "save as copy" but on all other items that use the form i need to only have the "save" function. is there any way to either change the function of the button depending on item that is being viewed in the edit screen OR hide the "save" button and only show the button associated with "save as copy - and vis versa for the rest of the items?? current button code is - protected function getToolbar() { $options = array(); $user = JFactory::getUser(); $create_ms = $user->authorise('core.create', 'com_pfmilestones'); $create_task = $user->authorise('core.create', 'com_pftasks'); $options[] = array( 'text' => 'JSAVE', 'task' => $this->getName() . '.save'); $options[] = array( 'text' => 'Save as new project', 'task' => $this->getName() . '.save2copy', 'options' => array('access' => ($this->item->id > 0))); PFToolbar::dropdownButton($options, array('icon' => 'icon-white icon-ok')); item used as template is id=8 any help or suggestions would be greatly appreciated.. Hi, I am not entirely sure what I am doing wrong here, and I have been looking at this for ages, so apologies in advance if I have become so bleary eyed I can't see something simple. I use php to create buttons based on values pulled for a table. The problem I have is when you click on the first button the javascript function works great, when you click on the next button you get the same output even though it should be different results. I am working in ff and I can see on my firebug console that the javascript function is being called, but it is not passing the new value of the second or third button, it just keeps repassing the value of the first button. So not entirely sure where I am going wrong here. My page is: Code: <script type="text/javascript"> function loadXMLDoc2(File,ID,Msg){ if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById(ID).innerHTML=xmlhttp.responseText; } } var params=Msg; xmlhttp.open("POST",File,true); xmlhttp.setRequestHeader("Pragma", "Cache-Control:no-cache"); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); } </script> <head> <body> <?php $con = mysql_connect("localhost","user","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydb", $con); $result = mysql_query("SELECT DISTINCT theme FROM goods WHERE category='{$_POST['category']}' ORDER BY theme DESC"); while($row = mysql_fetch_array($result)){ echo '<input type="text" class="hidden" name="theme" id="theme" value="' . $row['theme'] . '" ><input type="button" class="button3" name="product" id="product" value="' . $row['product'] . '" onClick="loadXMLDoc2(\'getShow.php\',\'txtHint\',\'theme=\'+encodeURI(document.getElementById(\'rtheme\').value))" > '; } echo '<br /><br /> <div id="txtHint"><div> <br /> <br />'; mysql_close($con); ?> And getShow.php produces a table with a list of product images, names and prices, based on theme. So basically not sure where I am going wrong here? i got javascripts button : Code: <input type="button" value="select" onClick="document.getElementById('input').select()" /> how can i transform "button" to image button (gif) I have 4 rows in a table. Each row consist of 4 radio buttons. Each radio button per row has different values in it but has the same name (group) ex: <input type="radio" name="a" value="1"> <input type="radio" name="a" value="2"> <input type="radio" name="a" value="3"> <input type="radio" name="a" value="4"> <input type="radio" name="b" value="1"> <input type="radio" name="b" value="2"> <input type="radio" name="b" value="3"> <input type="radio" name="b" value="4"> and so on.. If I click radio button A with value 2, I want to output the total at the bottom as "2".. Also, if I click radio button B with value 3, I want to output the total of A and B as 5 and so on.. How can I automatically calculate the answer based on which radio button was click? update: I got my answer from this site: http://stackoverflow.com/questions/1...s-using-jquery i am trying to make a button which is a .gif that will change when a mouse over occurs and a animation will occur when click then will relocate to a new page but i am getting multiple images at the same time pleas help. Code: <html> <body> <img src="Jepordy/Fla files/Button set 1.gif" > <img name="jsbutton" src="Jepordy/Fla files/Button set 1.gif" width="550" height="400" border="0" alt="javascript button"> <SCRIPT language="JavaScript"> var myimgobj = document.images["jsbutton"]; </SCRIPT> <A href="#" onMouseOver="return changeImage()" ><img name="jsbutton" src="Jepordy/Fla files/Button mouse over.gif" width="550" height="400" border="0" alt="javascript button"></A> <SCRIPT language="JavaScript"> function changeImage() { document.images["jsbutton"].src= "C:\Documents and Settings\fus10n\Desktop\Jepordy\Fla files\Button mouse over.gif"; return true; } </SCRIPT> <A href="#" onMouseOver="return changeImage()" onMouseOutwidth="550" height="400" border="0" alt="javascript button"= "return changeImageBack()" onMouseDown="return handleMDown()" onMouseUp="return handleMUp()" ><img name="jsbutton" src="Jepordy/Fla files/Button set 1.gif" width="550" height="400" border="0" alt="javascript button"></A> <SCRIPT language="JavaScript"> function changeImage() { document.images["jsbutton"].src= "C:\Documents and Settings\fus10n\Desktop\Jepordy\Fla files\Button set 1.gif"; return true; } function changeImageBack() { document.images["jsbutton"].src = "C:\Documents and Settings\fus10n\Desktop\Jepordy\Fla files\Button set 1.gif"; return true; } function handleMDown() { document.images["jsbutton"].src = "C:\Documents and Settings\fus10n\Desktop\Jepordy\Fla files\Button set 1.gif"; return true; } function handleMUp() { changeImage(); return true; } </SCRIPT> <A href="QUESTION LOCATION FOR THIS BUTTON GOES HERE!" onMouseOver="return changeImage()" onMouseOut= "return changeImageBack()" onMouseDown="return handleMDown()" onMouseUp="return handleMUp()"> <A href="http://www.javascript-coder.com/" onMouseOver="return changeImage()" onMouseOut= "return changeImageBack()" onMouseDown="return handleMDown()" onMouseUp="return handleMUp()" ><img name="jsbutton" src="Jepordy/Fla files/Button mouse over.gif" width="550" height="400" border="0" alt="javascript button"></A> </body> </html> I need an timed button. When you come to site, you must wait in that site ?? seconds and then button comes pressable.
All, I have the following code: Code: <form action="" name="myform" method="post"> <input type="hidden" id="picimages" name="picimages" value="<?php echo $resultsetstory['bigger_id']; ?>" /> <p> <label> <input type="radio" id="picimages" name="picimages" value="<?php echo $resultsetstory['picture_id']; ?>" /> <?php if($resultsetstory['title']<>""){ echo $resultsetstory['title']; }else{ echo "Image 1"; } ?> </label> <br /> <label> <input type="radio" id="picimages" name="picimages" value="<?php echo $resultsetpic2['picture_id']; ?>" /> <?php if($resultsetpic2['title']<>""){ echo $resultsetpic2['title']; }else{ echo "Image 2"; } ?> </label> <br /> <input name="submit" type="button" value="Vote!" onclick="javascript:voteupdate(this.myform);"/> </p> </form> When I submit this, it goes to this function: Code: function voteupdate(obj) { var poststr = "picimage=" + document.getElementById("picimage").value + "&bigger_id=" + encodeURI( document.getElementById("bigger_id").value ); alert(poststr); makePOSTRequest('voteresults.php', poststr); } However I can't get the value of the radio group for the one that is selected. Can someone see what is wrong? Thanks. hi, I'm trying to modify this function: Code: function togglePoly(poly_num) { if (document.getElementById(poly_num)) { if (document.getElementById(poly_num).checked) { gpolys[poly_num].show(); } else { gpolys[poly_num].hide(); } } } which works for a checkbox to one that works for a button. I guess I'm stuck on what to replace "checked" with there in the 3rd line. is there some one word answer, or do I need to I rewrite the function to be more button-friendly? thanks in advance All: I need some help with a radio button code. It seems simple but I am really new at JavaScript so I need help. I have created a JavaScript code that has three radio buttons (High, Medium, and Low). When you click on high two text boxes appear so that an email address can be added. What I need help with is making the text boxes disappear if someone accidentally click high and then went back to low or medium. Currently the High button stays clicked and the text boxes still show. Any help would be great. Thanks, Stephen Code: <script type="text/javascript"> function showHide(el){ obj = document.getElementById(el).style; (obj.display == 'none')? obj.display = 'block' : obj.display = 'none'; } </script> <form id="form1" name="form1" method="post" action=""> <label> <input type="Checkbox" name="High" value="High" onclick="showHide('group1')" /> High </label> <label> <input type="Checkbox" name="Medium" value="Button" /> Mediun </label> <label> <input type="Checkbox" name="Medium" value="Button" /> Low </label> <p id="group1" style="display: none;"> <label> <b>friend1  </b><input type="Text" name="textGroup1" value="@gmail.com" /> <br/> </label> <br /> <label> <b>friend2  </b><input type="text" name="textGroup1" value="@gmail.com" /> </label> </p> </form> I need to use javascript in a way in which it will keep clicking a button. The source code for that button is below: Code: <script type="text/javascript"> function set_opacity(id, opacity) { element = document.getElementById(id) if (/MSIE/i.test(navigator.userAgent)) { element.style.filter='alpha(opacity='+opacity+')'; } else { element.style.opacity = opacity/100; } } </script> <div class="recruiter_enabled"> <table cellspacing="0" style="width: 100%"> <tr> <td> <p> <script type="text/javascript"> //<![CDATA[ recruiter_clicks = 1 //]]> </script><a href="/recruiter/recruit/3p5tjd4pdnbg0" id="recruit_link" onclick="return(submit_link_as_post_with_opacity(this, 'recruit_image'))"><img alt="" class="start_recruiting" id="recruit_image" src="/A.gif?1221518016" /></a><script type="text/javascript"> //<![CDATA[ link = document.getElementById('recruit_link'); link_href = link.href; link.href = "#"; set_opacity('recruit_image', 50); setTimeout("link = document.getElementById('recruit_link'); link.href = '" + link_href + "'; recruiter_clicks = 0; set_opacity('recruit_image', 100)", 2000); //]]> </script> Therefore, I need javascript to keep clicking the button until it has clicked it 375 times. How would I be able to do this? I have this line of code: <input type='text' id='fCode' style="width:875px; height:22px;"/><br /><br /> Does anyone know how to add a copy button to so when you click it it copies everything in the box to your clipboard? Thanks -Wardman Hey all im getting used to using .js still and I am trying to figure out how to create a button to move a selected field within a box of fields to the top, instead of just moving it one-by-one to the top. Here is what I currently have that moves the selected just up one. Can someone expand on this and make it so it will move to the top instead of just one? SearchFieldsWindow.prototype.cmdMoveUp_OnClick = function() { var searchFields = this.__searchFields; var items = this.__lstSelected.get_Items(); var selectedIndices = this.__lstSelected.get_SelectedIndices(); var count = selectedIndices.get_Count(); for (var i = 0; i < count; i++) { var selectedIndex = selectedIndices.get_Item(i); // Don't allow when first item selected if (selectedIndex == 0) break; var uniqueID = items.get_ItemValue(selectedIndex); var label = items.get_ItemLabel(selectedIndex); searchFields.MoveUp(uniqueID); items.RemoveAt(selectedIndex); items.Insert(selectedIndex - 1, uniqueID, label); this.__lstSelected.SetSelected(selectedIndex - 1, true); this.__lstSelected.SetSelected(selectedIndex, false); } }; Hello. I have created a Bold button - when i click the button it applies it into my textarea. The Problem is if i want to apply the bold style only to a single line and the rest of the written text will be normal and not bold it doesn't work. How can I add to the function that when i select a certain line and click on the button to make it bold only the selected line will be bold?? This is the script : PHP Code: <script type="text/javascript"> function bold(id) { var element = document.getElementById(id); element.style.fontWeight = ( element.style.fontWeight == "bold" ) ? "normal" : "bold"; } </script> And this is the button : PHP Code: <img src="Bold.bmp"width="42" height="39" title="Bold Font" onclick="bold('bodytext')" style="cursor:pointer;" /> i am trying to achieve a JS driven button for a cms. for example i have a text in a textarea so i select the text and add the bold attribute to this text. my text before : text my text with bold added : <b>text</b> what the function to achieve this ? thanks Hi im new to javascript , i have a game when 2 or more players enter the game a button appears one of the players clicks the button the game starts, what i want to do is when 2 or more players join the game i want the game to start, and not start by using the button. here is the code for the button. PHP Code: if(($hand == '') && ($numplayers > 1)){ ?> var betbuttons = '<'; betbuttons += 'input type="button" name="Button" value="<? echo addslashes($BUTTON_START); ?>" class="betbuttons" onclick="push_action(\'start\');">'; I've never had this problem in the past and I am now stumped. I've written a fairly long script to calculate numbers for a web based Diabetes calculator but for some reason the "Calculate" button does nothing when using Chrome, Opera or Safari for iOS. It does work when using IE, Firefox and Safari for PC. I've looked everywhere and found nothing but some references to an 'onclick' problem in Chrome. My problem is that the same method has always worked in the past and is still working in those scripts now so that can't be the issue. What is different about THIS button that is breaking it? Button WORKS here (IE, Chrome, Firefox, Safari-PC & iOS & Opera): http://jdrinc.webatu.com/FICC.html But DOES NOT work here (Chrome, Safari-iOS & Opera): http://jdrinc.webatu.com/D-Calc.html The second link DOES work in IE, Firefox & Safari-PC. I don't see a difference in the method that I'm using in either of these. Does anyone know what I am doing wrong? Here is the html with the script that is NOT working: Code: <html> <head> <title> D-Calc </title> <style type="text/css"> table { border:2px solid black; border-collapse:collapse; } th { border:2px solid black; border-collapse:collapse; font-family: Arial, Helvetica, sans-serif; text-align: left; font-weight: bold; } td { border:2px solid black; border-collapse:collapse; font-family: Arial, Helvetica, sans-serif; text-align: left; font-weight: bold; } .inputlabel { background-color: #6CC417; } .outputlabel { background-color: #6698FF; } .inputbox { border:0px inset blue; background-color: #FFFFFF; border-color: #FFFFFF; text-align: center; font-weight: bold; width: 100px; } .outputbox { border:0px inset blue; background-color: #FFFFFF; border-color: #FFFFFF; text-align: center; font-weight: bold; width: 100px; } </style> <script type="text/javascript"> function Calculate() { //input variables var B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B11 //output variables var B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B26 //correction sensitivity variable var CSV //new blood glucose var NBG //bloodsugar-carbohydrate ratio var BCR B01=eval(document.DCalcForm.B01.value); B02=eval(document.DCalcForm.B02.value); BCR=(B02/B01); B03=eval(document.DCalcForm.B03.value); B04=eval(document.DCalcForm.B04.value); B05=eval(document.DCalcForm.B05.value); B06=eval(document.DCalcForm.B06.value); B07=eval(document.DCalcForm.B07.value); B08=eval(document.DCalcForm.B08.value); B09=eval(document.DCalcForm.B09.value); B10=eval(document.DCalcForm.B10.value); B11=eval(document.DCalcForm.B11.value); B12=(B10*(B03/100)); B13=(B11*(B04/100)); B14=(B09+B12+B13); B15=(B09); B16=(B12+B13); if (B07<(B05+(B06+1)) && B07>(B05-(B06+1))) { CSV=(0); } else if (B07>(B05+B06)) { CSV=(B06); } else if (B07<(B05-B06)) { CSV=(-1*B06); } if (CSV==0) { B17=0; } else { B17=((B07-(B05+CSV))/B02); } B18=((B12*(B03/100))/B01); B19=((B13*(B04/100))/B01); B20=(B09/B01); if (CSV=0) { B21=((B18+B19+B20)-B08); } else { B21=((B17+B18+B19+B20)-B08); } B22=((B17+B20)-B08); B23=(B18+B19); if (B21==0) { B24=0; } else { B24=((B22/B21)*100); } if (B21==0) { B25=0; } else { B25=((B23/B21)*100); } NBG=(B07+((B09+B12+B13)*BCR)); if (B07<(B05+(B06+1)) && B07>(B05-(B06+1))) { CSV=(0); } else if (B07>(B05+B06)) { CSV=(B06); } else if (B07<(B05-B06)) { CSV=(-1*B06); } if (CSV==0) { B26=0; } else { B26=(((B05+CSV)-NBG)/BCR); } document.DCalcForm.B12.value=(Math.round(B12*100))/100 + ' g'; document.DCalcForm.B13.value=(Math.round(B13*100))/100 + ' g'; document.DCalcForm.B14.value=(Math.round(B14*100))/100 + ' g'; document.DCalcForm.B15.value=(Math.round(B15*100))/100 + ' g'; document.DCalcForm.B16.value=(Math.round(B16*100))/100 + ' g'; if (B17<0) { document.DCalcForm.B17.value='0 unit(s)'; } else { document.DCalcForm.B17.value=(Math.round(B17*100))/100 + ' unit(s)'; } if (B18<0) { document.DCalcForm.B18.value='0 unit(s)'; } else { document.DCalcForm.B18.value=(Math.round(B18*100))/100 + ' unit(s)'; } if (B19<0) { document.DCalcForm.B19.value='0 unit(s)'; } else { document.DCalcForm.B19.value=(Math.round(B19*100))/100 + ' unit(s)'; } if (B20<0) { document.DCalcForm.B20.value='0 unit(s)'; } else { document.DCalcForm.B20.value=(Math.round(B20*100))/100 + ' unit(s)'; } if (B21<0) { document.DCalcForm.B21.value='0 unit(s)'; } else { document.DCalcForm.B21.value=(Math.round(B21*100))/100 + ' unit(s)'; } if (B22<0) { document.DCalcForm.B22.value='0 unit(s)'; } else { document.DCalcForm.B22.value=(Math.round(B22*100))/100 + ' unit(s)'; } if (B23<0) { document.DCalcForm.B23.value='0 unit(s)'; } else { document.DCalcForm.B23.value=(Math.round(B23*100))/100 + ' unit(s)'; } if (B24>100) { document.DCalcForm.B24.value='100 %'; } else if (B24<0) { document.DCalcForm.B24.value='0 %'; } else { document.DCalcForm.B24.value=(Math.round(B24*100))/100 + ' %'; } if (B25>100) { document.DCalcForm.B25.value='100 %'; } else if (B25<0) { document.DCalcForm.B25.value='0 %'; } else { document.DCalcForm.B25.value=(Math.round(B25*100))/100 + ' %'; } if (B26<0) { document.DCalcForm.B26.value='0.00 g'; } else { document.DCalcForm.B26.value=(Math.round(B26*100))/100 + ' g'; } // document.write('B01 = '+B01+'<br>'); // document.write('B02 = '+B02+'<br>'); // document.write('B03 = '+B03+'<br>'); // document.write('B04 = '+B04+'<br>'); // document.write('B05 = '+B05+'<br>'); // document.write('B06 = '+B06+'<br>'); // document.write('B07 = '+B07+'<br>'); // document.write('B08 = '+B08+'<br>'); // document.write('B09 = '+B09+'<br>'); // document.write('B10 = '+B10+'<br>'); // document.write('B11 = '+B11+'<br>'); // document.write('B12 = '+B12+'<br>'); // document.write('B13 = '+B13+'<br>'); // document.write('B14 = '+B14+'<br>'); // document.write('B15 = '+B15+'<br>'); // document.write('B16 = '+B16+'<br>'); // document.write('B17 = '+B17+'<br>'); // document.write('B18 = '+B18+'<br>'); // document.write('B19 = '+B19+'<br>'); // document.write('B20 = '+B20+'<br>'); // document.write('B21 = '+B21+'<br>'); // document.write('B22 = '+B22+'<br>'); // document.write('B23 = '+B23+'<br>'); // document.write('B24 = '+B24+'<br>'); // document.write('B25 = '+B25+'<br>'); // document.write('B26 = '+B26+'<br>'); // document.write('BCR = '+BCR+'<br>'); // document.write('CSV = '+CSV+'<br>'); // document.write('NBG = '+NBG+'<br>'); } </script> </head> <body> <center> <form name=DCalcForm> <table name="table" id="table" class="table"> <tr name="01" id="01" class=""> <td name="A01" id="A01" class="inputlabel"> INSULIN/CARBOHYDRATE RATIO </td> <td name="B01" id="B01" class=""> <input name="B01" id="B01" class="inputbox" value="10" type="number"> </td> <td name="C01" id="C01" class=""> </td> </tr> <tr name="02" id="02" class=""> <td name="A02" id="A02" class="inputlabel"> INSULIN/BG RATIO </td> <td name="B02" id="B02" class=""> <input name="B02" id="B02" class="inputbox" value="35" type="number"> </td> <td name="C02" id="C02" class=""> </td> </tr> <tr name="03" id="03" class=""> <td name="A03" id="A03" class="inputlabel"> PROTEIN RATIO </td> <td name="B03" id="B03" class=""> <input name="B03" id="B03" class="inputbox" value="40" type="number"> </td> <td name="C03" id="C03" class=""> </td> </tr> <tr name="04" id="04" class=""> <td name="A04" id="A04" class="inputlabel"> FAT RATIO </td> <td name="B04" id="B04" class=""> <input name="B04" id="B04" class="inputbox" value="10" type="number"> </td> <td name="C04" id="C04" class=""> </td> </tr> <tr name="05" id="05" class=""> <td name="A05" id="A05" class="inputlabel"> TARGET BLOOD GLUCOSE </td> <td name="B05" id="B05" class=""> <input name="B05" id="B05" class="inputbox" value="100" type="number"> </td> <td name="C05" id="C05" class=""> </td> </tr> <tr name="06" id="06" class=""> <td name="A06" id="A06" class="inputlabel"> CORRECTION RANGE/SENSITIVETY </td> <td name="B06" id="B06" class=""> <input name="B06" id="B06" class="inputbox" value="20" type="number"> </td> <td name="C06" id="C06" class=""> </td> </tr> <tr name="07" id="07" class=""> <td name="A07" id="A07" class="inputlabel"> CURRENT BLOOD GLUCOSE </td> <td name="B07" id="B07" class=""> <input name="B07" id="B07" class="inputbox" value="100" type="number"> </td> <td name="C07" id="C07" class=""> </td> </tr> <tr name="08" id="08" class=""> <td name="A08" id="A08" class="inputlabel"> INSULIN ON BOARD </td> <td name="B08" id="B08" class=""> <input name="B08" id="B08" class="inputbox" value="0" type="number"> </td> <td name="C08" id="C08" class=""> </td> </tr> <tr name="09" id="09" class=""> <td name="A09" id="A09" class="inputlabel"> CARBOHYDRATES </td> <td name="B09" id="B09" class=""> <input name="B09" id="B09" class="inputbox" value="0" type="number"> </td> <td name="C09" id="C09" class=""> </td> </tr> <tr name="10" id="10" class=""> <td name="A10" id="A10" class="inputlabel"> PROTEIN </td> <td name="B10" id="B10" class=""> <input name="B10" id="B10" class="inputbox" value="0" type="number"> </td> <td name="C10" id="C10" class=""> </td> </tr> <tr name="11" id="11" class=""> <td name="A11" id="A11" class="inputlabel"> FAT </td> <td name="B11" id="B11" class=""> <input name="B11" id="B11" class="inputbox" value="0" type="number"> </td> <td name="C11" id="C11" class=""> </td> </tr> <tr name="12" id="12" class=""> <td name="A12" id="A12" class="outputlabel"> CARBS FROM PROTEIN </td> <td name="B12" id="B12" class=""> <input name="B12" id="B12" class="outputbox" value="" type="number" readonly> </td> <td name="C12" id="C12" class=""> </td> </tr> <tr name="13" id="13" class=""> <td name="A13" id="A13" class="outputlabel"> CARBS FROM FAT </td> <td name="B13" id="B13" class=""> <input name="B13" id="B13" class="outputbox" value="" type="number" readonly> </td> <td name="C13" id="C13" class=""> </td> </tr> <tr name="14" id="14" class=""> <td name="A14" id="A14" class="outputlabel"> TOTAL CARBOHYDRATES </td> <td name="B14" id="B14" class=""> <input name="B14" id="B14" class="outputbox" value="" type="number" readonly> </td> <td name="C14" id="C14" class=""> </td> </tr> <tr name="15" id="15" class=""> <td name="A15" id="A15" class="outputlabel"> CARBS TO BOLUS NOW </td> <td name="B15" id="B15" class=""> <input name="B15" id="B15" class="outputbox" value="" type="number" readonly> </td> <td name="C15" id="C15" class=""> </td> </tr> <tr name="16" id="16" class=""> <td name="A16" id="A16" class="outputlabel"> CARBS FOR EXTENDED BOLUS </td> <td name="B16" id="B16" class=""> <input name="B16" id="B16" class="outputbox" value="" type="number" readonly> </td> <td name="C16" id="C16" class=""> </td> </tr> <tr name="17" id="17" class=""> <td name="A17" id="A17" class="outputlabel"> CORRECTION BOLUS </td> <td name="B17" id="B17" class=""> <input name="B17" id="B17" class="outputbox" value="" type="number" readonly> </td> <td name="C17" id="C17" class=""> </td> </tr> <tr name="18" id="18" class=""> <td name="A18" id="A18" class="outputlabel"> PROTEIN BOLUS </td> <td name="B18" id="B18" class=""> <input name="B18" id="B18" class="outputbox" value="" type="number" readonly> </td> <td name="C18" id="C18" class=""> </td> </tr> <tr name="19" id="19" class=""> <td name="A19" id="A19" class="outputlabel"> FAT BOLUS </td> <td name="B19" id="B19" class=""> <input name="B19" id="B19" class="outputbox" value="" type="number" readonly> </td> <td name="C19" id="C19" class=""> </td> </tr> <tr name="20" id="20" class=""> <td name="A20" id="A20" class="outputlabel"> CARB BOLUS </td> <td name="B20" id="B20" class=""> <input name="B20" id="B20" class="outputbox" value="" type="number" readonly> </td> <td name="C20" id="C20" class=""> </td> </tr> <tr name="21" id="21" class=""> <td name="A21" id="A21" class="outputlabel"> TOTAL BOLUS </td> <td name="B21" id="B21" class=""> <input name="B21" id="B21" class="outputbox" value="" type="number" readonly> </td> <td name="C21" id="C21" class=""> </td> </tr> <tr name="22" id="22" class=""> <td name="A22" id="A22" class="outputlabel"> UNITS TO DELIVER NOW </td> <td name="B22" id="B22" class=""> <input name="B22" id="B22" class="outputbox" value="" type="number" readonly> </td> <td name="C22" id="C22" class=""> </td> </tr> <tr name="23" id="23" class=""> <td name="A23" id="A23" class="outputlabel"> UNITS TO EXTEND </td> <td name="B23" id="B23" class=""> <input name="B23" id="B23" class="outputbox" value="" type="number" readonly> </td> <td name="C23" id="C23" class=""> </td> </tr> <tr name="24" id="24" class=""> <td name="A24" id="A24" class="outputlabel"> PERCENT TO DELIVER NOW </td> <td name="B24" id="B24" class=""> <input name="B24" id="B24" class="outputbox" value="" type="number" readonly> </td> <td name="C24" id="C24" class=""> </td> </tr> <tr name="25" id="25" class=""> <td name="A25" id="A25" class="outputlabel"> PERCENT TO EXTEND </td> <td name="B25" id="B25" class=""> <input name="B25" id="B25" class="outputbox" value="" type="number" readonly> </td> <td name="C25" id="C25" class=""> </td> </tr> <tr name="26" id="26" class=""> <td name="A26" id="A26" class="outputlabel"> MORE CARBS NEEDED </td> <td name="B26" id="B26" class=""> <input name="B26" id="B26" class="outputbox" value="" type="number" readonly> </td> <td name="C26" id="C26" class=""> </td> </tr> </table> <br> <input type="button" value="Calculate" name="CalculateButton" onclick="Calculate()"> </form> </body> </html> P.S. I am by no means a professional and am aware that there might be better ways of doing this. I am still learning. http://www.javascriptkit.com/script/script2/alarm.shtml this example of source code i try how to do 2 button alarm in this source code 1 button set alarm, and 1 button off alarm, i want create all this button have timer... how? example: 1 button set on at 06 hour 00 minutes 00 second another button set off at 12 hour 00 minutes 00 second I have this line of code: <input type='text' id='fCode' style="width:875px; height:22px;"/><br /><br /> Does anyone know how to add a copy button to so when you click it it copies everything in the box to your clipboard? Thanks -Wardman |