SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2011
    0 Post(s)
    0 Thread(s)

    options and buttons not quite working correctly in jquery

    In my jsfiddle I have an application where the user can select an option and their answers and then display it in a new row. I have one slight problem though, I think it will be easier to explain if you follow the steps below in my [fiddle][1]:

    1. Open the grid and select option "3". "3" would be displayed in the textbox and buttons "A" to "C" would appear

    3. Click on "Add Question" button. This would create a new row showing the details you have submitted.

    4. Now click on the "Open Grid" WITHIN THE ROW you have justmcreated and select option "5". Now the textbox within the row changes the value from "3" to "5" but if you look at the top where you first chose your options and answers, it displays 5 buttons from "A" to "E".

    This should not happen. This should stay to what it was previously which was buttons "A" to "C". it should only change if the option is chosen from the Option Type at the top and not within the row.

    So how can this be fixed? Please use the fiddle to test your ideas if it helps you.

    Thank you


  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Christchurch, New Zealand
    104 Post(s)
    4 Thread(s)
    Quote Originally Posted by malcolm p View Post
    So how can this be fixed?
    The open grid button within the row could call a function whose purpose is to create the buttons. It would only create buttons up to the max allowed, in your case, 3.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Posting Permissions

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