Skip to content Skip to sidebar Skip to footer

Javascript Onload Function Alternative

Hey guys I'm trying to integrate payment gateway in my website so they have send me a code but I'm quite new to javascript now they have send code working with tag and

Solution 1:

Div Onload Custom Script by JQuery

    var hash = '<?php echo $hash ?>';
    function submitPayuForm() {
      if(hash == '') {
        return;
      }
      //alert('here');
      //return false;
      var payuForm = document.forms.payuForm;
      payuForm.submit();
    }

$(function(){
  $('div[onload]').trigger('onload');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<div onload="submitPayuForm()">

Post a Comment for "Javascript Onload Function Alternative"