Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Conditional visualization of form elements not working

    Hi all,
    I had posted earlier on the NaN issue. I have worked some more on my test file. Basically I want the user to select an option depending on whether he/she has Paracetamol in syrup or drops form. Once this is selected, automatically a different div for syrup or for drops should be seen depending on what the user selected earlier.
    After this on pushing the calculate button, the output should be appropriate depending on the strength of the solution either for drops or syrup.
    I have put together what I think code that should work but it stubbornly refuses to do otherwise. I have attached the relevant file.
    If it doesn't work, obviously there is something wrong but what it is eludes me.
    Any help will be appreciated greatly,
    Thanks,
    Attached Files Attached Files

  • #2
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post
    I'd like to suggest you to learn more tutorials on javascript, as your code shows very weak understanding.

    Here is my modified version upon yours. I've tried to modify as little as possible. You may need beyond compare or other file differ tools to see complete change points.

    I've only tested it on firefox.
    Attached Files Attached Files

  • Users who have thanked allister for this post:

    nathanir (09-26-2011)

  • #3
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thank you allister for helping me out.
    It seems to be working well. The only hitch that I can see is that there is a dropdown list to right of the text box for strength of the formulation and on selecting any one, it does not automatically fill it in the text box but the user has to key it in herself. I shall try to work on that next.
    Your suggestion of going through tutorials and poor understanding is right and I take it in the spirit that it was intended. I am going through tutorials but at the same time getting my feet wet with actual real life examples that I am developing for my own personal website.
    My only defense is that I just started to learn Javascript. Different people have different ways of learning. Some will learn all the theory and then go on to actually experimenting with the stuff. I belong to the camp that like to plunge in and learn more from actually doing the stuff than just reading about it.
    By reading the different problems that people are facing and the suggestions offered by experts, I find that I learn far more than going step by step through the structured tutorials that are available.
    I dont think any one technique of learning is better. What works for one is good for that person.
    Thanks again,
    Rajesh

  • #4
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post
    OK, go on your own way. If there are still problems, we can communicate further.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •