HTML - Adding Values In A Drop Down Box
Hey. I have a page where users can choose how many hours they have worked each day of the week . I need to add those values up and display the total for the week.
I also need to be able to add them up before the submit or the server does any processing on them so dyamnic would be good Thanks in advance Similar Tutorialsi want it to calulate the total >>>> i have radio box which u can choose three different options i want all these to have a value sumfink like the first check box 10pound and the second 15pound and third sumfink else now i have a quantity box where they can choose they quantity of the check box item they have selected so if they choose the first check box where the item equals to 10pound the quantity should be doubled in the total box yeh has any1 got a code which can help me do this or give me a example that works so example the first check is a big pizza and it already should have a value so wen they click on it the total should read it as 10pound and add it from there to the quantity chosen and then dispaly the total please help ergent I need two cells to be next to each other. One is a label and the other is a drop down menu. The following code just shows the options next to each other as text. This is also being done in VB.net Code: "<td class=select <option>Fresh Milk</option> <option>Butter</option> </select></td>" & _ Nevermind, got it fixed! Please help. This is what I have so far http://bartletagency.com/m/x2.php Now, obviously with business cards there many different options. I need something to calculate on the side the total after picking each drop box option, or if easier, after hitting "calculate total." (preferably with the numbers in a table so I can make it appear by itself right underwear the send button) . Example: 1000 business cards in blue, say, would need to come up at 50 dollars if they pick 3-1, but if they pick 3-22 it needs to come up 60 dollars if they pick the other color, green, and pick 3-1, the label would need to turn to $55.00, if they pick 3-2 with the color green the label would need to say $65.00 how can i do this please? here is the code I have which made up the PHP file i linked you to above. code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>Lesson 3</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $me = $_SERVER['PHP_SELF']; ?> <h1 align="center">Business Cards</h1> <form name="form1" method="post" action="<?=$me?>"> <table border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td align="right" valign="middle">Quantity:</td> <td><select name="Quantity: "> <option value="1000">1000</option> <option value="2500">2500</option> <option value="5000">5000</option> <option value="10,000">10,000</option> </select> </td> </tr> <tr> <td align="right" valign="middle">color</td> <td><select name="color"> <option value="blue">blue</option> <option value="green">green</option> </select> </td> </tr> <tr> <td align="right" valign="middle">3</td> <td><select name="3"> <option value="small">3-1</option> <option value="medium">3-2</option> </select> </td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Send"> </td> </tr> </table> </form> <?php } else { error_reporting(0); // initialize a array to //hold any errors we encounter $errors = array(); // test to see if the form was actually // posted from our form $page = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if (!ereg($page, $_SERVER['HTTP_REFERER'])) $errors[] = "Invalid referer<br>\n"; // check to see if a name was entered if (count($errors)>0) { foreach($errors as $err) echo "$err<br>\n"; echo "<br>Please use your browser's Back button to fix."; } else { // no errors, so we build our message switch($_POST['color']){ case 'red': $recipient = 'mathew420@gmail.com'; break; case 'green': $recipient = 'mathew420@gmail.com'; break; case 'blue': $recipient = 'mathew420@gmail.com'; break; default: $recipient = 'mathew420@gmail.com'; } $subject = "Widget On Line Order"; $from = stripslashes($_POST['Name']); $msg = "Message sent by $from\n"; $msg.="\nSize: ".$_POST['size']; $options=$_POST['options']; $msg.="\nOptions:"; if ($options) for ($i=0;$i<count($options);$i++) $msg.= "\n- $options[$i]"; else $msg.="\n- None"; $msg.="\nColor: ".$_POST['color']; $extension=($_POST['extension'])?"Extension: Yes":"Extension: No"; $wallmount=($_POST['wallmount'])?"Wallmount: Yes":"Wallmount: No"; $deskmount=($_POST['deskmount'])?"Deskmount: Yes":"Deskmount: No"; $msg.="\n$extension\n$wallmount\n$deskmount"; $msg.="\n".stripslashes($_POST['MsgBody'])."\n"; if (mail($recipient,$subject,$msg)){ echo "<p>Thanks for your order!</p>"; echo nl2br($msg); } else echo "An unknown error occurred."; } } ?> </body> </html> thanks so much Ok Say I Have One Text That Ses 1.5 And I Want To Add 0.5 To IT The Answere Would Be 2.0 Can Javascript Do That Properly I Dont Need To Know How To Do It I Can Manage Just Querious If It Will Add Fractions Before I Start Working On It? Can somebody help me figure out how to add another <ul> to my dropdown menu? I can't seem to get another menu item item from 'For Rent' -> 'Holiday' - 'Apartments' -> then here I want to list the locations 'Nerja', 'Torrox' and 'Frigiliana' but I can't get it to display properly. Anyone got any pointers. Html: http://www.for-rent-nerja.com/index_links.html CSS: http://www.for-rent-nerja.com/scripts/index_links.css (the link css is at the very bottom) Cheers Jamie Hi all, I currently have images for my corners and I'm trying to add corners via CSS. http://www.css3.info/preview/rounded-border/ I am struggling quite a lot. Could anyone look at the website I'm working on and just advise me on the code change please? It's really simple but I keep getting repeating images and all sorts. The website in question is http://www.karishmabhandari.com I would like white corners to blend in with the white content area. I've very much noticed this is in the wrong section if someone could move it for me please. hey can someone please help i am having trouble with adding a banner when i just to add it the picture does not show what could i be doing wrong??? hi people, i have this code Code: <tr valign=\"top\"> <td align=\"center\" width=\"1%\"><a href=\"preview.php?id=".$arrayId[$scriptOffset+1]."&ref=browse&offset=".$scriptOffset."\"><img src=\"thumb/".$arrayImage[$scriptOffset+1]."\" STYLE=\"border: none;\"></a></td> <td ><font face=\"verdana\" size=\"2\"><b><i>Nume:<br>Marime:<br>Format:<br>Cat.:</i></b></font></td> <td ><font face=\"verdana\" size=\"2\"><i>".$arrayName[$scriptOffset+1]."<br>".$arraySize[$scriptOffset+1]."<br>".$arrayFormat[$scriptOffset+1]."<br>".$arrayCatagory[$scriptOffset+1]."</i></font></td> <td ><font face=\"verdana\" size=\"2\"><a border='0' href=\"preview.php?id=".$arrayId[$scriptOffset+1]."&ref=browse&offset=".$scriptOffset."\" ><img src=\"images/descarca.jpg\" STYLE=\"border: none;\"></a></font></td> </tr> and i wanna to add an image here can somebody tell me how to add the image in the html code? Does anyone know how to add a favicon to each of a site's pages using the CSS Style sheet as apposed to putting the code on each page? Hi All, After hours of searching, I have yet to find a solution to my problem so I am turning to you all for advice. Here is what I am trying to accomplish - I would like to add an event to a <DIV> to make the background image change when the user mouses over the <DIV>. Further, I would like to turn the entire <DIV> into an <A>, so that no matter where the user clicks in the <DIV> they will be taken to a new page. The two obstacles I am running into are semantics and support. Simply wrapping the <DIV> in an <A> tag does not work because the browser does not interpret <A> as a containing element. Inserting the <A> inside the <DIV> I run into the same problem - the <A> just sits at the top of the page and does not contain anything. As for the event - :hover would suffice if IE5 & 6 supported it for <DIV>, but as we all know this is not the case. Since 60% of users are still running this [expletive] browser, I need to find a workaround. My guess is that there is JavaScript somewhere that will solve my problem - but I have not found anything yet. Can anyone direct me to an article or other resource that offers some info on the aforementioned? Or has anyone done this themselves that can offer a few pointers? Thanks in advance! I was wondering how i add sound to my webpage, so that it plays when the user enters the page, but with a play and stop button. Hi there.. i added some menu buttons for my site this is the code for the menu button <BUTTON TYPE=SUBMIT> <IMG SRC="../graphics/sfsmile.gif" HEIGHT=97 WIDTH=105 ALT="Starflower" ALIGN="ABSMIDDLE"> <STRONG>Send It In!</STRONG></BUTTON> Or go here i took this code from this website http://www.htmlcodetutorial.com/forms/_BUTTON.html you have an example here Now i added them but i have no clue how to add a link to this button so that when i click on it sents me to a page.. any ideeas pls ? Can anyone help me so that i can add a link to this menu button ? Thx Here at www.ultdmovies.com, I'd like to know how to add another button next to contact and say "about". Also, how can I edit the buttons to make them more stylish, like borders, colors, etc? Okay now I figured that this would be rather simple, though being as noobish at this as I am, I can't figure it out. I simply need a code that adds up prices from 5 different dropdown lists. If you wanna look at these lists just reply. Any help would be appreciated. Hey... I am working on a site for me and my friends, and I have a question. See this website. As you can see I have used imagemapping to link the area where home is written, to bring you back to the frontpage. I would like to know how i could put a textbox or table inside the white square, or possibly a frame linked to the other sites. Code: Here is my HTML coding:<HTML> <HEAD> <TITLE>Calypto Productions Website</TITLE> </HEAD> <BODY bgcolor= "#000000"> <style type="text/css"> </style> <img src="http://calypto-productions.webs.com/atomicfrsteutkastdz0.png" usemap = #example border=0> <map name=example> <area shape=Rect Coords="262, 125 , 406, 170" Href="http://calypto-productions.webs.com/alt.htm/"> </map> </BODY> I'm trying to add an anchor to my blog, but without having any link to it in the page itself. I just want to be able to have a specific address for the part of the page that I want to jump to, so that I can cite that address in other places. Is there any way to do this? I tried inserting this in a random part of my page: <a href="#name"></a> And then this immediately above where I want the anchor to be: <A NAME="name"></A> But...going to mywebsite.com#name did not take me to the anchor, it just opened the page like normal. Ideas? I forgot how to add an avatar my home page URL. did a search but got no results. TIA I created the css below. It is a list that contains my navigation buttons on the left hand side of the page. The buttons work good. Now, I want to add some pictures to the left of the buttons. When I do this a space becomes apparent between the buttons. (top & bottom). I tried adding a layer but like I said it creates a space between buttons. Any help is appreciated. Thanks,. .Blockhead #navcontainer { width: 200px; } #navcontainer ul { margin-left: 0; padding-left: 0; list-style-type: none; font-family: Arial, Helvetica, sans-serif; } #navcontainer a { display: block; padding: 3px; width: 160px; background-color: #669966; border-bottom: 1px solid #eee; ; background-image: none } #navcontainer a:link { color: #FFFF00; text-decoration: none; } #navcontainer a:hover { color: #33FF99; ; background-image: none ; background-color: #669999 } #navlist a:visited { color: #CCCCCC; text-decoration: none; Is it possible to add a poll to a html or php site? Hi guys, I know scroll-bars are automatic when your page gets longer than the screen. I have recently developed a new webpage, and on some pages your required to scroll down, on others you aren't. How do I leave the right hand scroll bar there even if its not required (greyed out) This way my site doesn't seem out of line as they navigate through it. |