I am trying to create a form/calculator. My concept includes drop down menus, check boxes, roll over images, and calculations. I've been trying to do the coding in Microsoft Excel; however, this has been very cumbersome, and the look is very generic.
I need advice about creating an order form (I was sent here from the General Web Building forum!) and I have been told that JavaScript is the way to go - can anybody help with the following (I know nothing about Javascript really).
I have an order form and plan to have the data emailed to me (I have FormMail script installed on my server). The form will have the following fields:
Reference Number Size / Cost Quantity Grand Total
Clients will enter the ref no., choose a size/ cost (radio-button), and quantity (text box). I plan to accept details for about different items. I just want the total cost to be displayed in a box at the bottom before the form data is sent to me.
Can anybody point me in the right direction of how I might go about this? Tutorials / sample code etc.
I need help setting up a form, I want to do some pretty neat things: It will say: What countries do you want to visit? [FIELD] Part 1: I want that when a user starts typing into the field, it will suggest under things that match what you have typed so far, sort of like facebook search does. So I would need a list of recognized country names. Now for example imagine I was using this, and I typed in M, it would list under a max of 5 valid entries begining with M, if I typed in Me, it would list the ones begining with Me, if I typed in Mex, it would show Mexico. Now the user would have to click this drop down suggestion to choose it.Part2: I want once a user clicks on a suggestion, it will "pop under" the input box or somewhere, with a "x" beside it to remove it. The user can now type in another country, and when it is clicked it too appears as a sort of "icon" under the input box or somewhere, with an "x" beside it. Clicking the x removes the country from the current list of countries. Once he is done, he goes on to other fields and the selected countries remain visible. Once a user submits the form, I want to get only the countries that were visible to him.
**An alternative idea, if this one is too complicated, would be to have a drop list with all countries in it, and once a person clicks one, it will remain and a "+" sign will appear under it. When pressed, another dropdown menu will appear so the person can choose another country from the second drop down, etc. OFC all selected countries can have an X to remove them. Idk how to do this either. how to do something like this, where do you recommend I start? Any ideas? I tried searching but I'm not sure what to call this so I couldn't find anything in the search.
Im opening an excel worksheet and adding data to it using Javascript ActiveX Excel Object as below
var Excel,Book; Excel = new ActiveXObject("Excel.Application"); Book = Excel.Workbooks.Open("c:/example.xls"); var excel_sheet = Book.Worksheets("Sheet1");
[code]....
In the above code the column A in excel worksheet will have a unique value.I need to delete the entire row matching the value in column A and shift the rest of the rows up using this Javascript ActiveX Excel Object.
I am trying to convert this excel formula into a Javascript equivalent for a form I am doing in Acrobat Pro 9 and you guessed it. everything is done apart from this.
I keep getting a NaN on this form-based calculator I am trying to make... I can't figure out what I am doing wrong. Any input, or in this case "output", Here is the code:
Code: <script type="text/javascript"> function calculateBudget() {
Here is the code contained within the form: Code: <tr><td><span class="item_title"Logo Sticker</span> (min. order 100) <img src="images/0_pic.gif" border="0" onclick="MM_openBrWindow('images/orderform/ogo_sticker.gif','','scrollbars=yes,resizable=yes,width=400,height=550')" /> </td> <td width="178">$4.00<br />per 100</td> <td ><select name="Logo_Decals_MEMB_A0_006" id="cpa_logo_stickers" onchange="Calc(this.form);"> <option value="0"> </option> <option value="100">100</option> ..... I know that this is not the proper code, it is copied from another form that uses a different Javascript. What code would I need to insert to make it work here?
I have a sample of working code that is used for an item which costs $1.00 and has no drop down selector: Code: <tr> <td><span class="item_title-blue">Envelope - Individual</span> <img src="images/0_pic.gif" alt="Click to See Picture of Item" border="0" onclick="MM_openBrWindow('images/orderform/env.jpg','','scrollbars=yes,resizable=yes,width=408,height=547')" /></td> <td align="center" valign="middle">$1.00 </td> <td align="center" ><p> <input name="Envelope" type="text" id="FormsEditField224" onchange="KW_calcForm('Envelope Total',100,2,'#Envelope','*','1')" value="" size="4" maxlength="4" /> <label><div align="left"> </label></td><td align="center"><p> <input id="FormsEditField225" type="text" name="Envelope Total" value="" size="9" maxlength="10" onfocus="this.blur()"/> </p></td></tr><tr>
The above code does run correctly, I just need it to be for a 4.00 per 100 drop down list as demonstrated before.
I am working on a calculator page for a clients site. I am using dreamweaver and form calculator made by Kaosr as behavior / plugins in dreamweaver. The way I have it set up is first the user enters some numbers in boxes, clicks a get refund now button and a div element appears with the answer. The whole calculator works..but I cant get the answer to appear in currency format. I've found tons of applets for javascript that change it into currency format upon clicking a button or clicking elsewhere on the page.. but none that automatically will make a text box display currency when the answer appears..
I have only one variable for input which is diameter of a circle in millimeters. This ultimately converts into a Gauge value as in gun barrels. I can do this in Excel but haven't much of a clue about coding for a web page element. -So I have input X halved to give a radius. -Then 4/3 pi r cubed gives the volume in cu mm -Volume x 0.01134 which is the weight in grams of lead per cubic mm gives the weight of the sphere -This is then divided into 453.59237 which is the weight of a lb of lead in grams -Result is number of spheres per lb lead i.e. the gauge -So if we start with a bore of 23mm (0.906"). -We end with a gauge of 6.278 and a weight of 72.26gms (2.549 oz)
I have a simple calculator on my website which has a few options selectable by radio buttons. When the user adds selections - the total price of their order is automatically calculated and displayed in a <div> for them to see. The client then can deselect options or add according to their budget. The code which deals with this is as follows (just sections of it but you get the point ....) In the <HEAD>
<script type = "text/javascript"> var allprices = []; var index = 0;
I want to add this calculator form to our website (here is the link to what he wants exactly [URL]) so I try to copy that code but it won't work. I was wondering if this javascript would work.
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.
I have a HTML/Javascript code which dynamically calculates the entries and gives the grand total.I have it working in table form using textboxes, but when I try to transform it using iWebkit to Form using small fields, the calculator does not work.I want to simply subtract 1 text field from another and user presses a button and gives an answer in a 3rd text field
THIS IS THE GENERIC HTML USING JAVASCRIPT WHICH WORKS FINE....
I'm just learning javascript and am editing a calculator form that will calculate square footage and write to a form text field. I have another form filed that I would like to display a number based a series of if else statements. ex: if square footage > 2761 then display 5.0., if square footage > 2521 then display 4.5. etc.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<HTML> <HEAD><TITLE>Size Calculator</TITLE> <SCRIPT LANGUAGE="JavaScript"> function CalculateSum(Atext, Btext, form){ var A = parseFloat(Atext); var B = parseFloat(Btext); form.Footage.value = A * B; form.Size.value = 21; }
/* ClearForm: this function has 1 argument: form. It clears the input and answer fields on the form. It needs to know the names of the INPUT elements in order to do this. */
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.
I'm trying to translate an asp application, i have some difficulties with a particular line : --- Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0") ---
Classical ajax exemples rather use : [...] req = new ActiveXObject("Microsoft.XMLHTTP");
.... But i'm not sure the ActiveXObject is identical to the original : Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
I'm not an asp expert, can you give me some tips on that question ?
I am trying to use AJAX and JSON to do this. I have copied an example of using HttpRequest Object as the backbone of this from http://www.w3schools.com/dom/dom_http.asp. Further, I am enclosing both of my files here, in full as opposed to mere snippets. This code does what I wish it to do except:
1. It does not update when getdata.php is rewritten. On non MSIE broswers, it shows when first invoked, but not subsequently. 2. It fails altogether under MSIE (6.026 SP1 || SP2) -- I never get xmlhttp.readyState==4 under MSIE.
I have a link that opens .doc files, .docx files, csv files or .xls or .xlsx files. i want silent printing of these files. Only one file opens at a time.
If silent printing is not possible then atleast print dialog box should open up along with the file. i am trying to implement this using javascript.[code]...
This is on a page deep inside a secure ordering sequence, so it's probably not worth copying the URL here.
According to my crib-sheet, "document.all" is only valid in the javascript of IE4 and later. My browser is IE6 (SP1) which qualifies, but the javascript I have doesn't like it. I also have other browsers and Frontpage 2002 installed. Code:
I've been researching the whole night (and now early morning) on how to disable the Edit With Microsoft Office FrontPage (draw-down of File) feature to no avail even though I know it is possible. To confront the nay-sayers, here's proof-positive evidence: [URL]. On the above site, and virtually all clear channel company radio sites, when you click down on File, you'll see that Edit With Microsoft Office FrontPage is disabled.
I read that you are to type the following in the code, but it has not worked for me: <meta http-equiv="editable" content="dream-on"/> Found on [URL] Again, this does not work for me. Maybe I inserted it wrong? Where is the above <meta line supposed to be inserted in the code view of the web page?
The other incidental issue I have that I'd like to address is this: I found that a web site, naturalhandyman.com, has an extraordinary html encryption protection system: In the DESIGN VIEW, mind you, of his site on FrontPage, not the code view, all of his content is blocked out, replaced with a phrase such as, "[../_private/iipbotter.html]." HOW IS THIS POSSIBLE? I'd like something like this! Do you know what he used? Also is he using a particular type of encryption software because it seems his search rank is not being affected at all?
I have a javascript program that works fine under Firefox and on IE when running XP, but is having a problem with IE running under Windows 2000 Pro.
On my personal XP development machine I have the Microsoft Script Editor and I can set a breakpoint, step through code, inspect variables, etc... with no problem.
On a machine where I am trying to debug this problem I am running Windows 2000 Pro with IE 6. I installed the Microsoft Script Debugger. When the program hits the exception the script debugger will come up and show me the line where the error occurred.
I need to be able to inspect the variables to determine the problem. However, from what I can tell, there isn't anywhere to inspect or watch the variables in MSD?