Add A Radio Button With Numeric Value To Cost Calculator?
Feb 21, 2011
I have a simple form on my artwork website that allows a customer to enter a numer of prints and a number of colours and then calculates a price of the order (for their curiosity only - that is the end of the function).I have now changed the way I have priced my orders and want to make it so that, for instance, if a customer wants 2 prints it will be �150.00 (�75 per print) but 3 prints will be �195.00 (65 per print) and so on the more they order.What I want to do is to add a list of prints from 1 to 10 with a radio button next to each. the user can then select 5 prints.The way my form works right now (see code below) is that the customer enters a numeric value and then the javascript takes the value and multiples by a pre-set "PrintAmount" value.Because that value is constant - I can't make multiples of prints different values (or can I ?) Heres my javascript (form below):
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
<!--
[code]....
View 26 Replies
ADVERTISEMENT
Feb 11, 2009
I am not a programmer so this may be simple but I am not sure what the proper code is. I am trying to place a script I have on my website for a simple product cost calculator.The fields are simple quantity, product, cost per product and total.What my issue is, is that I am trying to put a 59.00 fee as a variable that will be charged on any order, it is a service fee, I just can,t figure it out. I thought I could just change the 0 to 59.00 at the variable but it is not workingHere is the code:
function showDivs(divs)
{
//get number of div to show
[code]....
View 5 Replies
View Related
Apr 16, 2011
Have to make a calculator to calculate wallpaper sizes and cost (college course so not for the 'real world' so doesnt need a great deal of functionality. Do i make a form in html and then name each cell? what then? Lost as hell here and been watching countless tutorials for js, need guidance i think now.
View 18 Replies
View Related
Jan 27, 2011
I have write my code for calculate, discount, total plus other cost but it didnt work for me. I have stuck here for a week, I have done everything to make it right but it seems that doesnt listen to me, so correct my code.
First option; I have 4 choices of tours; people can choose 1 in 4.
Second options; I have 4 different choices of payments; people can choose 1 in 4 Need to alert them if they didnt choose each of the option.
Total cost of choice for tour deduct each option of payment for discount
Example;
<script type="text/javascript" language="javascript">
View 9 Replies
View Related
Mar 16, 2010
I am a PHP programmer and new to Javascript and jQuery and I have tried about 20 examples/tutorials and cannot seem to get even close to what I want.I have a form (PHP/MySQL) with a list of subjects I got from my database, and then create a set of radio buttons from that list. And based on what radio button they select, I need to pass that variable to a div (at least that's what I want to use) and then show a list of videos that match the radio buttons value. I don't care if its a get or post or other.I tried to use GET or POST so I can use that value for my PHP/MySQL lists.I am open to any suggestions/tutorials, etc.
View 1 Replies
View Related
Aug 23, 2010
I am trying to make an option calculator for my site. The user will click on various radio buttons and checkboxes, before pressing the calculate button. The button will then add up all the values to show the overall figure. The code shown below is what I have so far.
Code:
function calcMe(){
for (var i=0; i < document.form.radio.length; i++){
if (document.form.radio[i].checked){
var rad_val = document.form.radio[i].value;
}} if (document.form.radio1.checked) {
document.form.result.value = rad_val;
} if (document.form.radio2.checked) { .....
The first javascript is to show the value of the radio button with the textfield attached - when the user puts a number in the textfield, it will update the value of the radio button. The second javascript is to check the document for the clicked radio buttons and checkboxes. It then adds up all the clicked values to show the answer. The problem that I am having is to put these two javascripts together so as the radio button is updated with the text field value as well as adding up all the clicked values.
View 1 Replies
View Related
Jun 11, 2011
I am looking to build an expenditure calculator. What I am having problems with is I am using radio buttons to multiply form field values
[radio1] = x 1 (week)
[radio2] = x 4 (month)
[radio3] = x 52 (year)
So if you fill out a field and select [radio2] it multiplies the field by 4. If you then select [radio1] it reverts to the original value. Using JQuery what's the best way to do this. The issue I am having is I need to know the previous selected radio as well as the new one so I know whether to divide or multiply.
View 1 Replies
View Related
Mar 24, 2010
l need to apply a hover css on a radio button. Currently the background color only draws a box around the radio button but does not the actual radio color. l dont mind if there is no css even javascript will do
View 1 Replies
View Related
Feb 24, 2009
Need a script which selects a second radio button when the first radio button in the pair is clicked with the second button greyed/disable but still displaying the selection.
(Hoping to keep the input 'name' the same too if possible - maybe they can be differentiate by 'id' for the script ?)
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
[Code].....
View 11 Replies
View Related
Apr 7, 2011
so i am working on a calculator but i am having trouble with the % buttonif i do 200*50% it should be 100, but now it says 0.5the function code:
function PercentButton() {
if(NewNumber != "blank") {
Number2 *= .01;
[code]....
View 2 Replies
View Related
Feb 28, 2010
Im trying to configuere a form that a.a radio buttons that allow the user to choose between quarters, nickels, dimes and pennies and show image when click on my radio button.how to get the image to display whenthey click on the radio button?
View 3 Replies
View Related
Jul 15, 2011
how I can make each radio button call a different page. For example If i click on radio button 1 and click submit it will take me to [url].... and if I click radio button 2 and click submit .
View 7 Replies
View Related
Mar 23, 2009
I have a set of radio buttons each with an onclick event that has a numeric value. When the button is clicked an input box called "Total" is updated with the new value. The problem I'm having is that if a radio button is checked and one clicks on it again then the onclick event is triggered.
Is there any way to prevent the onclick event from triggering if the radio button is already checked?
View 2 Replies
View Related
Jan 20, 2011
I have 3 radio buttons with the same name ("myradio"). The value of each is a different URL (eg. value="http:[url]...)I have a link underneath these (<a href="#">Send</a>). I would like the selected radio button's value to be inserted into the href of the link, and if the user selects a different radio button that this changes.
View 1 Replies
View Related
Feb 15, 2010
Wondering if someone could help me out. i am developing a simple javascript calculator at the problem is this:When I use the input type = button or submit, then the calculator works fineBUTI need to use a custom button and now the calculator just shows the results for a split second and then disappears and the form reloadsHere is my code:
<html>
<head>
<script language="JavaScript">
[code]....
View 13 Replies
View Related
Oct 16, 2010
I need to make a button that will display my name in the answer box of my calculator.
Can anyone please show me the code to do this?code...
View 1 Replies
View Related
Oct 21, 2011
I have a form with 4 radio buttons, the scenario is, when a user click on a radio button a hidden content will be displayed and the other three radio buttons will be disabled so that at one time a user can only click and view single radio button and the hidden content.Here is my code to show hide the hidden content but i need when the user select one radio button the other radio buttons should disable.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />[code]......
View 17 Replies
View Related
Oct 9, 2010
I have a JavaScript calculator, here is the code:
<script type="text/javascript">
var num1=prompt('Enter your first number',"");
var num2=prompt('Enter your second number',"");
var problem=prompt('Enter the operator you wish to use..x,X,+,-,/ are valid..',"");
if (problem=="+")
{
[Code]...
It will open when the page comes up, but how do I put it so that it opens when the user clicks a button?
View 9 Replies
View Related
May 12, 2010
I am attempting to pass a value from child to parent window. My issue is that I can't get the value of my radio button to the parent when there is more than one radio button. I get a result of "undefined".
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" dir="ltr">[code].....
View 1 Replies
View Related
Jul 13, 2010
I am trying to produce a web form to allow wedding guests to RSVP. The form allows them to enter a name and select from a radio button whether they will be attending or not. If they select the "yes" radio button then a further pair of radio buttons are displayed for their meal preference.
They can then click a submit button or they can click another button to add another line for another guest which operates in exactly the same way. I've almost got this working, but it seems that the checkbox change handler is lost for the current guest when a new guest is added and the checkbox value is reset. I've got a feeling I'm doing something stupid but can't for the life of me figure out what.
Code (source file (renamed to .txt) also attached as I'm not sure the pasted code is too clear):
View 2 Replies
View Related
Feb 13, 2009
I have it set up so that there are three frames (frames and the use of javascript are encourage for practice) "bar" on the left with navigational options, "main" in the center where the body of the drill is presented, and "feedback" along the bottom where the feedback will appear.
My issue is that I have everything working except the form! I'm not sure how to make it so that upon clicking the submit button the feedback is presented in the "feedback" frame. This was suggested to me but isn't working, maybe I have a mistake somewhere? Or is there another way I can do this?
<html>
<head>
<script type="text/javascript">
function CheckCheckbox() {
[Code]....
View 4 Replies
View Related
Jun 21, 2010
i know how to enable the button when one or the other is selected, how do i check if both are selected?
View 2 Replies
View Related
Nov 28, 2009
I'm trying to get a radio button validation for different sets of radio buttons that simply contains Yes & No buttons.
Here's what I'm trying to do:
Question 1: if Yes, then (Alert 1) if No, then (Alert 2) (if Yes, then Question 2 appears) *Up to here I'm happy- can't figure out the rest*
Question 2: if Yes, then (Alert 1) if No, then (Alert 2) (if Yes, then Question 3 appears)
I need the Alerts to be swapped from this point*
Question 3: if Yes, then (Alert 2) if No, then (Alert 1) (if NO, then Question 4 appears)
Identical for Question 5, and for Last Question 6 Alerts swapped back again.)
Here's the script that I managed to piece together:
View 5 Replies
View Related
Oct 28, 2010
This is my first post here because I cannot figure out how to do this assignment! I have to: Create a Web page for a digital photo development company. Include a form that allows clerks at the company to enter orders for each customer. The form should allow you to enter one item per order. Include radio buttons for different types of items that can be created with digital images, including hard copy prints, posters, coffee mugs, and t-shirts. Use a Date object to automatically calculate the date an item will be ready, based on the current date. For example, hard copy prints and posters should be ready one day from today, coffee mugs two days from today, t-shirts three days from today, and so on. SUBMIT the form to the FormProcessor.html document.
I have done everything but the portion where I have to take the value from the radio button set and add it to the current date. Please look it over and tell me where I am going wrong.
[Code]...
View 14 Replies
View Related
Jun 20, 2010
Basically, I need it so that if a user selects 'option1' in the group 'group1' when they go to 'group2' is only gives them a certain selection to choose from. If they choose 'option2' in 'group1' they will get a different set to choose from.
View 5 Replies
View Related
Jul 23, 2005
I have a form used to submit data (no surprises there!). I'd like to be able to populate the same form with previously submitted data.
The data lives in a database once submitted and using ASP I can populate
text boxes/textareas using this data no problem. What about radio buttons?
If I have 2 of them named the same rb1 and rb1 with values of yes/no
respectively. How can I check the one that was initially checked?
View 4 Replies
View Related