Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19914
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php, comp.lang.javascript |
| Subject | Re: use a value form a manu list in a form on the same page |
| Followup-To | comp.lang.javascript |
| Date | 2013-05-24 00:19 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <knmbmj$qhr$3@dont-email.me> (permalink) |
| References | <0bb368d4-5bd4-4cbb-aeb9-6962aa134b6d@googlegroups.com> |
Cross-posted to 2 groups.
Followups directed to: comp.lang.javascript
On Mon, 22 Apr 2013 03:40:12 -0700, newbie php wrote: > I'm so glad you guys helped me out a couple of days ago, so i thought > i'd had another go. You did? How did that work out for you. > Here's the situation: in a form i want a visitor to choose form a list a > value of 1 to 10. Yeah, in a form if you want the user to choose a number like that you can use an html select / option, or a set of radio buttons, or you could use a text input and let the user enter a number, but they might enter a number outside your range. > This chosen value should be multiplied by a value of > 2750 which should be stored in a variable and shown on the page > (recalculated by any change in the list) This sounds more like a javascript thing than a php thing, you probably don't want to submit your form to the server each time the user changes their option. > this value does nog necesarily be in the form itself. The most important > question is how to put the chosen value in a variable. Not quite sure what a nog is. Well you'd use an appropriate javascript function to get the value from the input type that you were using, making sure that you did any needed conversions to numeric data if it started life as a string value, and then do the relevant multiplication and display it in a suitable output location. > Any help is greatly appreciated You're welcome. xp and fu set, this sounds like primarily a js issue, not a php one -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Re: use a value form a manu list in a form on the same page Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-24 00:19 +0000 Re: use a value form a manu list in a form on the same page The Natural Philosopher <tnp@invalid.invalid> - 2013-05-24 10:12 +0100
csiph-web