User Profile
Collapse
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptThanks for the help. I finally got it. One of the variables was wrong so it wasn't pulling the calculated total to show the correct results. I also got the links to work as well, and it's not to buggy. -
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptI appreciate the feedback. It does help out a lot. I got the calculation button to calculate the question. Once clicked the "Sample Text" does switch out (which is leaps and bounds from where I started).
Only problem is the text that is shown when the button is clicked is the
"<b>If you score higher than 12</b>, the pain you are experiencing is out of the “normal” range, and the pain...Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptInstead of dcument.write, you stated to use textContent. I don't know where that goes. I understand the basics of javascript and can usually bend it to do what I want/need it to do. I am a designer tasked with this since the developer stated "getting a dynamic text area to show a particular snippit of data to show a different result depending on the content of a calculate box is " over his head"". That doesn't leave me with much....Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptThis is the form code I am using to test the script and I am not even getting a calculation from the question. Yes=2 No=0
...Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;
Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptOkay, so this is what I have for the javascript. If I use this (which still doesn't function), how do I get it to show up in the form where I want it to. I know I can control it with CSS, but the text area (either hidden or just empty, probably going to use an empty one) needs a variable as well. Does this script need to go on that element or on the form itself?
...Code:<script type="text/javascript"> <!--
Last edited by Dormilich; Nov 20 '12, 03:27 PM. Reason: Please use [CODE] [/CODE] tags when posting code.Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptI appreciate the input. I adjusted the variable "total" to "score". The main reason for using total, "total" is the input id. I do have a calculate button. If it is to late to use document.write, then what should be used. My depth in javascript is shallow at best. Below is the source for the form.
...Code:<form action="http://www.sepaincare.com/rate-your-pain-quiz.html" enctype="multipart/form-data"
Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptI have this code but it's not seeing the field value.
...Code:<input type="text" class="rsform-input-box" id="total" name="form[Total]" size="20" value=""><br /> <script type="text/javascript"> <!-- var name_element = document.getElementByName('form[Total]'); var total = name_element.value; if( total <= 5 ){Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin Javascriptdoesn't' there need to be a variable for the score or would that be
var score=""
to pull whatever the data is from the "score" field?Leave a comment:
-
SEMKTG replied to How do I get a calculation results box to dynamically populate a text box informationin JavascriptActually, it has been requested and I am more of a front end developer. I can tweek code if it's close to what I need. What I haven't been able to find is a text field that will populate dynamically given a value in a calculation field.
If you went to the site, and scrolled down to the lower part; where the "If your scored 0-5". That would be the text shown depending on the value that would be populated in the "Pain Quiz...Leave a comment:
-
SEMKTG started a topic How do I get a calculation results box to dynamically populate a text box informationin JavascriptHow do I get a calculation results box to dynamically populate a text box information
I have a calculating form. Once the end user hits the calculate button to get their results, we want those results to dynamically populate a text area to show them information directly related to their score.
The URL: www.sepaincare. com/rate-your-pain-quiz.html
No activity results to display
Show More
Leave a comment: