Using a radio button with a calculation
Hello
I have a question of calculation for the group. I'm trying to calculate creatinine clearance. Sounds easy, but I'm stuck at the end.
creatinine clearance is: ((140-age) * weight (kg)) / (72 * Scr)
Women are multiplied by 0.85 to get the final result of creatinine clearance
I have a box for the age, weight and scr and the user has entered the number.
Here where I'm stuck at is the end... I have a radio button for women so that the result is multiplied by 0.85. I thought that something like this might work... but nothing helps.
var crcl2
CrCl2 = (140 - this.getField('age').value) * (this.getField('weight').value) / (72 * this.getField('cr').value);
var crcl3
function validate (carbbox)
{
If (carbbox.checked == 1)
CrCl3 == crcl2 * 0.85;
on the other
CrCl3 is crcl2;
}
Im kinda new to this obviously... any help would be really appreciated.
Thanks, chris
Unless you repeat the calculation in function in several places with different values or you want a funciton of type library which could be adeed to other forms, use of the service may not be necessary.
Event.value = "; assume not performed calculation
perform the calculation if the divisor is not equal to zero
If (this.getField('cr').value! = 0) {}
adjustment for sex
var adjGender = 1;
If (if (this.getField("carbbox").value == 1) {})
adjGender = 0.85; fit for the female sex
} / / end of adjustment for sex
calculate creatinine clearance
Event.Value = (140 - this.getField('age').value) * (this.getField('weight').value) / (72 *)
this.getField('cr').value)) * adjGender;
} / / end of calculation
Tags: Acrobat
Similar Questions
-
Hello
In my form, I want the radio button.
On the selection of this radio button user can change the status of "QC" for "STOCK".
Initially, when he disabled status should be "QC".
How to put this in my form guide me please.
MauryMake a group of Radio (say RADIO_GROUP16) with 2 buttons radio (mean RADIO_BUTTON17 and RADIO_BUTTON18).
Specify the initial value of Radio group to U
Specify the value of Radio to R and U buttonsand in the status field to write after outbreak.
If: block. RADIO_GROUP16 = 'U' then
message ("can not update status '");
raise FORM_TRIGGER_FAILURE;
end if;I guess that when you select the second radio button (with the 'R' value) then only you would be allowed to change the status.
Please check the answer correct/useful if th answer was helpful
-
Radio buttons with drop-down menus?
I have created a form for the HR Department of my company, and I need a few radio buttons with dependent drop-down lists.
In other words, I would (for example) three radio buttons. None of the drop down lists appear until one of the buttons is selected and displayed the appropriate drop-down list. Is this possible? Or is there a better way to do it? I don't want a drop down menus not selected to be available.
I have 9 Pro for Windows and Pro X for Mac. I know almost nothing about scripts, but I know it can be done.
Thanks in advance for any help!
Theresa
Add this code to the action of the group, or individual radio button actions?
For each individual button.
Make the drop down menus visible or hidden?
Their visibility will be determined by the State of the radio buttons. By default, you can set to hide, when no radio button is selected.
Can I put any code in the drop-down list properties, or just in the radio button properties?
Only in the option boxes.
And when you say "integrate this code at the level of the doc", does that mean?
Go to Advanced - Document Processing - Document JavaScripts...
Create a new script, delete the default text that appears in the window, and paste the code I provided instead.
-
Chart with several selections of text by using the radio button
Is there a way to make a menu of radio button before the interactive export? My goal is to have a graphic with a text box inside that when page header dropped into Indesign from a library opens a menu of radio button that I can choose a category to the page. Looks like a bit of scripting and I don't know where to start or if there is an easier way to get the end result.
You will need a script. This lot will be able to help.
The script will have to set some kind of event listener that detects when a library item is placed. Where you will have the different texts depends on how many and they are likely to change.
P.
-
How to use a radio button state to calculate a value in another field
I produce a registration form that uses radio buttons to specify an accommodation meals and requirements for individual registrants - separate option buttons select the meal (YES or NO) plan and the type of accommodation (NO THANKS, A, B or D).
I want to ask the State of these boxes to option and, if selected (set), calculate the amount to pay for registration in the related areas of subtotal ( Plan -meals and accommodation). In other words, based on the costs of $ for YES, A, B and D on a per Member basis, I want to enter an amount of $ in the subtotal fields 'meal Plan' and 'accommodation'. In the ABSENCE or NO THANKS is selected, no calculation is necessary.
The form attached, if a given registrant (for example Reg01) chooses to include a meal plan (selected option button M01-Y ), then in the numMEAL subtotal field must increment of $80. Similarly, if Reg01 wants to book a double room (R01-D) I want to add $268 for the subtotal numROOM field. It goes without saying that the numMEAL and numROOM fields must reflect the cumulative amount based on the requirements of all listed registered (Reg01 via Reg05)
Example: I want to use a FormCalc calculation something like... (If M01 - Y is set then $80) + (if M01 - Y is set then $80) + etc ... to calculate the value of the field numMEAL and any other equivalent expression for the numROOM field.
Also (but don't feel you have to answer), in the design-time view how to configure to display radio button selections No. or NO THANKS as the default selection (set) such as the other buttons in the PLAN of FOOD groups and the TYPE of ROOM are not selected (not set) - (I think that would correct indications of error that I see). I managed to configure this radio button state initial for groups TYPE CITIZENSHIP and PAYMENT of the form but can't seem to do for groups of PLAN of MEALS and the TYPE of ROOM .
Thanks in advance for your help.
I think this is what you wanted... .view attachment. The problem with multiple selections in Design view is cause-in the name. I changed it to the rooms because it is to be interpreted as a subtraction. You must change them in meal option buttons as well and that will clear up the design problem you mentioned.
To get the room to add correctly, I changed the value for the room price. Then on the event rentals field calculate I simply add all room radioButtonList. The calculate event fires whenever a room is changed. For meals, I put the code on the RadioButtonList to every meal (just to show you a different technique). You could od it exactly the same way as the rooms but it is up to you.
Paul
-
Get the status of a Department in a popup by using a radio button
I have a use case. A page with a button. The user clicks on this button, and then a pop-up window will appear showing the table of departments. The user will choose the desired radio button. After that, the popup closes and the list of employees should appear in the page.
I wrote a method in the property valuechangeevent of the option button (autosubmit is also set to true), but still I'm not able to get the current line. I need actually value departmentid.
Can someone guide me?
JDev 11.1.1.6public void onClickRadio(ValueChangeEvent valueChangeEvent) { // Add event code here... System.out.println("onClickRadio Begins"); hidePopup("p1"); DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding iter = bc.findIteratorBinding("DepartmentsView1Iterator"); Row row = iter.getCurrentRow(); Number departmentId = (Number)row.getAttribute("DepartmentId"); System.out.println("departmentId: " + departmentId); OperationBinding method = (OperationBinding)bc.get("displayEmployeeTable"); method.getParamsMap().put("departmentId", departmentId); method.execute(); AdfFacesContext.getCurrentInstance().addPartialTarget(empTable); System.out.println("onClickRadio Ends"); }
You can try with autoSubmit = true on selectBooleanRadio?
Also set the group to a text attribute in your selectBooleanRadio.Of tagdoc -.
in all cases, you must set the group attribute.
http://docs.Oracle.com/CD/E23549_01/apirefs.1111/e12419/tagdoc/af_selectBooleanRadio.html
Published by: Sudipto detrilles on May 21, 2013 03:52
-
Group of radio buttons with the URL of image in a table
I try to display text and an image for a group of radio buttons to make the form look like
text (*) for point 1 {image for point 1}
text () for article 2 item 2 {image}
text () to the point 3 {image for point 3}
I found these:
Display image in the Group of radio buttons?
It looks like all I have to do is create a LOV that looks like:
SELECT {complex stuff that generates the text string, tag img and image URL}
DB_PK
OF dynamic_view_for_lov - public synonym
But my images are stored in a table.
I was able to create an IR using the "= BLOB column Format" method.
The SQL code for the report looks like:
Select
display_text, db_pk, image_len, image_clob
of dynamic_view_for_lov - public synonym
And the IMAGE_LEN column number/Date Format is:
IMAGE: DYNAMIC_VIEW_FOR_LOV:IMAGE_BLOB:DB_PK:Inline:Download
My question: how to create the URL for the tag img for the LOV?
Thank you very much
MK
MikeKutz wrote:
My question: how to create the URL for the tag img for the LOV?
Use of the
apex_util.get_blob_file_src
method of the API. -
Is radio buttons with images - possible?
Hi, I would like to create a list of radio which went from horizontally (Western characters). Before each selection, to do a picture. It's pretty easy to rig through tables/subforms when you use a low flow top, but in the interest of saving space on the form, they really need to be Western characters. Anyone know of a way to do this?
Not that I can think of, unless they are named the same and you set a global being. Once you do this, then they act like a group of radio buttons. Another advantage to this is that you can uncheck. Radio buttons cannot be deselected when you select one, you can change to another within this group.
-
Radio buttons with a specific text necessary to provide in particular for the selection of RB
Hi all
Adobe Acrobat 9 Pro.
1. I'm not sure how to set up this script, because I'm very inexperienced in terms of coding.
Each radio button has specific text areas to be filled according to the selection of the radio button.
'Radio Button1' has 4 values/selection (1, 2, 3 and 4).
Note: Option 4 has 3 separate text boxes must be filled (proposal4, Text5 and Text6).
If a user selects 1: Text1 should be filled and no admission for Text2, Text3, proposal4, Text5 Text6.
If a user selects 2: text 2 must be filled in and no entry for Text1, Text3, proposal4, Text5 Text6.
If a user selects 3: text 3 must be filled in and no entry for Text1, Text2, proposal4, Text5 Text6.
If a user selects 4: Test 4, Text5 and Text6 must be filled in and no entry for Text1, Text2, Text3.
When I'm saying no entry, basically locked or will receive an error if the data is inserted.
2. I am also uncertain where I would like to insert the code and how it works.
Thank you in advance,
Josh
For the example given and newness to the coding, you might try to display / hide the fields instead of scripts. An example is attached.
Discover the activities of each of the radio buttons. Basically, for each choice of radio, corresponding text fields will be displayed or hidden. (The default property for each text field is hidden.) Each choice will remove the text field data previous choice via a form of reset action applied to these fields.
-
Radio buttons with values and how to calculate.
Hello
Im am pretty new to building Web site and in particular with script, so please be gentle .
For the moment, I work with Dreamweaver CS4.I create a formula of the "ecological footprint" with several questions of the Radiobutton.
These questions must have a certain value attached to each possible answer and then when I press 'submit' to end these values must be added together and display the score. But how?
Example:Question 1
How will you work:* Market/bicycle value: 0
* Value train/bus: 5
* Car value: 7Question 2
How do you travel by train/bus.* Never of value: 0
* A few times a month value: 2
* A few times a week value: 5
* Daily value: 10* Submit * = calculate and display values. For example, Question 1, I had a value of 5 and 2 10 issue. So pressing submit should then dispay ' 15'.
That's what I have so far, the questions and answers are in Dutch.
Hoe ga jij naar school?</strong></p> <form id="form1" name="form1" method="post" action=""> <p> <label> <input name="question1" type="radio" id="question1_0" value="0" /> Lopend/Met de fiets</label> <br /> <label> <input type="radio" name="question1" value="5" id="question1_1" /> Met het openbaar vervoer</label> <br /> <label> <input type="radio" name="question1" value="10" id="question1_2" /> Met de auto</label> <br /> </p> </form> <p><strong>Hoe vaak reis je met het openbaar vervoer?</strong></p> <form id="form2" name="form2" method="post" action=""> <p> <label> <input type="radio" name="question2" value="0" id="question2_0" /> Nooit</label> <br /> <label> <input type="radio" name="question2" value="2" id="question2_1" /> Slechts een paar keer per maan</label> <br /> <label> <input type="radio" name="question2" value="5" id="question2_2" /> Wekelijks</label> <br /> <label> <input type="radio" name="question2" value="10" id="question2_3" /> Dagelijks</label> <br /> </p> </form> <form id="form3" name="form3" method="post" action=""> <label> <input type="submit" name="Bekijk de uitslag!" id="Bekijk de uitslag!" value="Bekijk de uitslag!" /> </label>
PS: I have an addon for Dreamweaver called "Form Calculator", created by KaosWeaver, but I don't really know how it works...Sorry about that. I was looking at him in Live View mode. To stop the value of disappear, change the onsubmit for this event handler:
onsubmit="getScore(this);return false"
-
styling:
#user-menu button, #user-menu .sheet17x17 { background-color: transparent; cursor: pointer; } #user-menu .sheet17x17 { margin: 2px; width: 17px; height: 17px; overflow: hidden; white-space: nowrap; display: inline-block; } #user-menu .sheet17x17.sheet-effects>img { position: relative; } #user-menu .sheet17x17.sheet-effects:hover>img { right: 17px; } #user-menu #user-menu-profile:hover>img { outline: solid azure 1px; } #user-menu #user-menu-social>img { margin-left: -68px; margin-top: -143px; }
HTML:
<div id="user-menu"> <span id="welcome-msg" class="lang-content">Welcome, </span><span id="goto-profile">Guest!</span> <button id="user-menu-profile"><img src="profiles/erich.seac/avatars/avatar-28x28.png" /></button> <button id="user-menu-comm" class="sheet17x17 sheet-effects"><img src="css/kacang.png" /></button > <button id="user-menu-social" class="sheet17x17 sheet-effects"><img src="css/kacang.png" /></button > <button id="user-menu-aux" class="sheet17x17 sheet-effects"><img src="css/kacang.png" /></button > </div>
-However it works-
<div id="user-menu"> <span id="welcome-msg" class="lang-content">Welcome, </span><span id="goto-profile">Guest!</span> <button id="user-menu-profile"><img src="profiles/erich.seac/avatars/avatar-28x28.png" /></button> <div id="user-menu-comm" class="sheet17x17 sheet-effects"><img src="css/kacang.png" /></div> <div id="user-menu-social" class="sheet17x17 sheet-effects"><img src="css/kacang.png" /></div> <div id="user-menu-aux" class="sheet17x17 sheet-effects"><img src="css/kacang.png" /></div> </div>
You can report a more complete using this site test case if you do not have other accommodation: jsFiddle
-
Using the component radio button to an image on a MovieClip
Hello
I use the radio button in Flash with a button component continue.
When the user clicks their option in the option button and continue to clicks, I want a specific image of movieClips.
Here is the breakdown and the script I have at the moment is lower.The operating system of radio for the named group RadioButtonGroup
The occurrence of each of the three options names are noviceButton, intermediateButton, expertButton
My button continue has an instance name of continueButton
and my movie clip I'm trying target has an instance name of level_mc
Here is my code so far:continueButton.enabled = false
noviceButton.addEventListener (MouseEvent.CLICK, revealContinue);
intermediateButton.addEventListener (MouseEvent.CLICK, revealContinue);
expertButton.addEventListener (MouseEvent.CLICK, revealContinue);
function revealContinue (evt) {}
continueButton.enabled = true;
}continueButton.addEventListener (MouseEvent.CLICK, clickContinue);
function clickContinue (evt) {}
var frameNumber is mc_levels. Number (noviceButton.Group.selectedData)
Stop (frameNumber);
}
the problem starts with my line of varFrame--I know not how so he could go to the movieClip and Stop in a specific image, based on the option button has been clicked and after a click on the button continue.
Anyone out there have any ideas?
Thank you
Babs
use:
continueButton.enabled = false
noviceButton.addEventListener (MouseEvent.CLICK, revealContinue);
intermediateButton.addEventListener (MouseEvent.CLICK, revealContinue);
expertButton.addEventListener (MouseEvent.CLICK, revealContinue);
function revealContinue (evt) {}
continueButton.enabled = true;
}
continueButton.addEventListener (MouseEvent.CLICK, clickContinue);
function clickContinue (evt) {}
var frameNumber = 2 + Number (noviceButton.group.selectedData)
level_mc.gotoAndStop (frameNumber);
}
-
Simple table with radio buttons
Hi guys,.
I have here a simple table that contains a number of option buttons.
Option buttons must be grouped by three, (you can select either 0, 1 or 2 in each column)
I am having difficulties to consolidate the buttons as such.
The form is attached. Can someone help me?
Thank you
Hello
You need three boxes into a single cell. Drag buttons 2 and 3 in the Group 1 exclusion of radio on the second column in the view hierarchy. To simulate a table, turn on the top and bottom of the cell lines and off up and down lines on three boxes. Get the boxes of the same size option (it helps to have snap to grid off the coast), same book and aligned. Remove the two bottom lines, and it should look like a table again.
Good luck
N.
PS: If users are going to fill this in hand, you can follow the example of Jono and have radio buttons with a square and square hollow brand. The place is more intuiative on the page and even on the screen that the place stands out more against the choice of the user. I understand that the use of sunken places working against practices of the circles for the exclusion, but with your form groups, I suspect that clarity is important because the choice is perhaps "health"; "have you made a will? "beeeeeeeeep!" ;-)
-
Change ' display as ' type text box with radio button
Hello
I have a field on a form html clob. I have the default ' display as ' the value "Textarea with spell checker... I created a radio button with 2 values:
Edit
Overview HTML
Is it possible to change the "display as" to "with the HTML Textarea editor' to switch between the radio button options? Any help would be appreciated I am running 3.1.2.00.02
Thank youYou could
(1) call textarea_1 'Textarea with spell checker.
(2) define as «Textarea with HTML editor» textarea_2
(3) use javascript to show or hide one of them according to the radio buttonCITY
-
All the choices with guest of radio buttons
Hello
I have a requirement to show the quick values as radio buttons which includes the 'YES', 'NO', 'ALL '. I don't have the value 'ALL' in DB, but when I try to select the choices of ALL in the prompt it shows not any option as all THE CHOICES. Can someone help me out here.
Thank you
Prasanna
Prassu, you should never use a radio button something like that. Radio buttons require a strict condition of "GOLD" - i.e. "has or B ', but not ' has and B.
You must instead use checkboxes. Then, if a user wants the two they can check them both.
THX,
Scott
Maybe you are looking for
-
All searches from the toolbar causes all of the tabs to be highlighted in firefox 8
All searches from the toolbar (file; Edit; View; History; Bookmarks; Tools; Help) then scrolling down causes all tabs to highlighted. I did have this problem in version 3.6 since I upgraded to 7 and 8, that this problem continues to be a problem.
-
NB520 - black screen when the POST and Windows 8.1
Good afternoon! I'm in a strange problem.My netbook screen shows black during POST (Bios) and sometimes shows a few white lines, as interference. If I boot Windows OS 8.1 the problem persists.If I run Ubuntu, I can see everything normally. I looked o
-
Satellite U400-15E - upgrade to Windows 7 32 bit now NO sound via HDMI
I've upgraded from vista to windows 7 32-bit, now I have no device HDMI appears under playback devices, I installed new drivers for windows 7, but still no luck. Under Device Manager/noise appears as a HDMI enabled device and when it is connected to
-
Satellite A300 - Question about BIOS password
Hello on the machine, I had a bios password set for the start.After that I put this password empty start it asks me for some other password enter the bios menu.I am able to boot up the laptop, launch Vista and do what I want to do besides enterering
-
HP 15-r111ns: Downgrade or install windows 7 by HP 15-r111ns
Hello. Can you please explane me measures for decommissioning or install windows 7 in my laptop HP 15-r111ns? Thank you.