|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
A simple puzzle?
Can anyone create the javascript to make this work?
(It uses onCLick and onCHange rather than submitting to a server side program) php Code:
If you can, it would help me solve a much larger problem and I would be eternally grateful! |
|
#2
|
|||
|
|||
|
RE: A simple puzzle?
you never posted the code for the doCalcs() function which would be necessary to figure out yor problem.
|
|
#3
|
|||||
|
|||||
|
RE: A simple puzzle?
I didn't have one when I posted that, I have been posting more complicated versions here, but no one replied.
However, after writing the simple form, it came clear and here is the .js (Although, it'd be intresting to see how it should be written properly!): php Code:
|
|
#4
|
|||
|
|||
|
RE: A simple puzzle?
can you give a little more background on what is to happen as each dropdown is changed?
|
|
#5
|
|||
|
|||
|
RE: A simple puzzle?
FYI the onChange event fires as the textbox loses focus, not as the text is changed. The code as you have it seems to work fine.
another problem is that selectedIndex starts at 0 not 1 |
|
#6
|
|||
|
|||
|
RE: A simple puzzle?
Yes, the SelectedIndex does, but zero is current a line that says "Choose" (I may add an alert to this Index)
The main form that I am working on is here : http://www.mikenco.com/generalcif-temp.html If you want to see the bit to which this applies, scroll down the page to the smaller of the two large tables enititled "Any other debts, including loans, credit cards, store cards etc" Choose "self" from the first column, add a value to the pink column, then scroll down the page to the section marked "Outgoings Summary". As you can see I have much to do yet!!.. as well as write the PHP processor for emailing the form (but that bit I have done before and is not too hard) Please don't spend any valuable time on this unless you are bored as I have resolved the issue which I was having trouble with. (If you can see any other potentially better ways of doing anything in the form, I would surely appreciate the input) Thanks for your intrest Mike |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > A simple puzzle? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|