New Landing How can we help? Themeforest Theme Support Flexform onclick JS function removes in code snippet automatically

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Flexform
  • #81345
    Axle
    Member
    Post count: 7

    Hey, why it removes the onclick=”calcRoute();” JS function from Code Snippet box ??

    <input id="submit_directions" name="submit" onclick="calcRoute();" type="submit" value="Get Directions!">

    #81528
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its due to XSS security and best SEO purpose. Remove code onclick="calcRoute();" and put given below code at Admin -> Theme Options -> Custom CSS / JS -:

    <script>
    jQuery(document).ready(function($) {
    $( "#submit_directions" ).click(function() {
    calcRoute();
    });
    });
    </script>

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register