reset password
Author Message
cgome106
Posts: 19
Posted 21:03 Jun 08, 2016 |

Did anyone figure out how to do part 3 of the final? I cant seem to get the converted values to display inside of the input fields when the submit button is clicked.

epascua
Posts: 47
Posted 21:07 Jun 08, 2016 |

Give every individual input an id, then use "getElementByID" to replace the values.

cgome106
Posts: 19
Posted 21:24 Jun 08, 2016 |

.

Last edited by cgome106 at 09:14 Jun 09, 2016.
epascua
Posts: 47
Posted 00:22 Jun 09, 2016 |

Just a warning, I know CSNS is strict with posting code, take it down ASAP. c:

With that said, try putting the equations inside the if statements and change the if statements to work if there isn't a value inputted. In your code, you're making the variables in the function change but not exactly the variables in the form. In order to do that, you'll need to use the following code: document.getElementById("nameOfIdYouIntendToEffect").value = whatYouWantToChange. 

I hope that's clear!

epascua
Posts: 47
Posted 00:25 Jun 09, 2016 |

Also, I'm not exactly sure what you're trying to achieve in your if statements.