PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

JSON problem - I want to revert to a previeous version of the plug-in

  1. newwws
    Member

    Is it possible to download the previous version of the plug-in?

    I've installed the latest version and now the JSON in my form doesn't work any longer. As I have other things to do, I want to re-install the previous version of the plug-in and fix the problems later.

    That being said, I'm happy to hear if someone knows why this throws an error with the latest version:

    options[options.length] = new Option(array['cursusdatum']);

    http://emday.nl/inschrijven/inschrijfformulier/

    TIA, Miriam

    Posted 12 years ago on Tuesday May 8, 2012 | Permalink
  2. Miriam - send me an email to rob@rocketgenius.com and reference this post.

    Posted 12 years ago on Tuesday May 8, 2012 | Permalink
  3. Try using "select.find('options')" or "select.children('options')" instead of prop and see if that fixes it.

    Posted 12 years ago on Tuesday May 8, 2012 | Permalink
  4. newwws
    Member

    Rob, thank you for your help. The code you suggested didn't work. As I already told you in my e-mail, the problem had something to do with the prop/attr-thing. After commenting out the code for the "fix" in grafityform.js my script worked as before.

    I want to file this as a bug, because I think it's not the task of a plug-in to fix old code of other scripts. People who have a problem with old code should rewrite their script. That's a better solution than a plug-in that redefines a part of jQuery.

    Please, get rid of the "fix" in a new version of this great plug-in.

    // "prop" method fix for previous versions of jQuery
    //var originalPropMethod = jQuery.fn.prop;
    //
    //jQuery.fn.prop = function() {
    //    if(typeof originalPropMethod == 'undefined') {
    //        jQuery.fn.attr.apply(this, arguments);
    //    } else {
    //        originalPropMethod.apply(this, arguments);
    //    }
    //}
    Posted 12 years ago on Monday May 14, 2012 | Permalink
  5. Hi Newwws,

    We're not in love with the fix either. Unfortunately, we get an incredible amount of support from users who are using outdated versions of jQuery where the prop() method is not supported. It may not be our responsibility to fix their issue; however, it sure makes our lives a little easier.

    With that said, I do apologize that the "fix" we implemented in the latest version actually contains an issue and has been causing some users some grief. The updated code is below and will be included in the next release.

    [js]
    // "prop" method fix for previous versions of jQuery
    var originalPropMethod = jQuery.fn.prop;
    
    jQuery.fn.prop = function() {
        if(typeof originalPropMethod == 'undefined') {
            return jQuery.fn.attr.apply(this, arguments);
        } else {
            return originalPropMethod.apply(this, arguments);
        }
    }

    If you feel like giving the updated fix a spin before the release hits the auto upgrader, let me know how it goes.

    Posted 12 years ago on Monday May 14, 2012 | Permalink
  6. newwws
    Member

    Hello David,

    This fix fixed the fix ;) Everything is working ok now.

    Kind regards, Miriam

    Posted 12 years ago on Wednesday May 16, 2012 | Permalink
  7. Thank for checking Miriam! Glad we got it right this time. ;)

    Posted 12 years ago on Wednesday May 16, 2012 | Permalink

This topic has been resolved and has been closed to new replies.