Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    209
    Plugin Contributions
    1

    Default jquery code not working after upgradation

    Upgrading from zencart 1.3.9 h to 1.5.5 f . In the includes/module/customfolder/jscript_main.php , there is a jquery code to submit a form $('#'+element+'').submit(); where element is the id of that form . The code submits everything fine in 1.3.9h but after upgradation to 1.5.5 f ,its not working , the value of element is showing , but the page redirects to time_out.

    even tried to replace
    $('#'+element+'').submit();

    with
    document.getElementById("+element+").submit();

    but that didn't help either

    Urgent Help required . Thanks in advance.

    function looks like

    function confirmation(element) {

    var ask= confirm("The text");



    if (ask){




    $('#'+element+'').submit();



    }
    else{

    }
    }

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: jquery code not working after upgradation

    The page/form needs to also submit the session information in order to accept the posted data.

    This can be accomplished by:
    Code:
    <?php echo zen_hide_session_id(); ?>
    Being placed within the start and end of the form.

    There are also some minor improvements to the above code, but the above is needed for ZC 1.5.0 and above.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: jquery code not working after upgradation

    Quote Originally Posted by mc12345678 View Post
    The page/form needs to also submit the session information in order to accept the posted data.

    This can be accomplished by:
    Code:
    <?php echo zen_hide_session_id(); ?>
    Being placed within the start and end of the form.

    There are also some minor improvements to the above code, but the above is needed for ZC 1.5.0 and above.
    This also assumes that the form is generated as a post type form instead of the older get style form. If maintaining a get style form, then the session id will need to be incorporated into the link destination.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v151 "Uncaught ReferenceError: jQuery is not defined" Zen Lightbox not working
    By Pointylimbs in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 14 Jun 2013, 04:13 PM
  2. v151 my custom jQuery code does not work, why??
    By tlyczko in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 27 Dec 2012, 12:09 AM
  3. Custom Code not working
    By nitesh107 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 3 Jun 2011, 06:45 PM
  4. apsonashop Server error after Upgradation to 1.39
    By atiqkhan in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 23 Jul 2010, 10:08 PM
  5. embeded code not working after update
    By willpower68 in forum Addon Payment Modules
    Replies: 2
    Last Post: 9 Jul 2010, 02:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR