Skip to content Skip to sidebar Skip to footer

Jquery Ajaxing In Processmaker

I am using a web app called ProcessMaker. They do not have support for jquery. So I had to figure out how to integrate it myself. There were lots of people on their forums trying t

Solution 1:

In Processmaker exist a library "makorak" this library generate problems with other libraries.. hence you Should use jquery as follows...


var $JQ = jQuery.noConflict();

$JQ("#myField").value = 'cochalo';


hope I've helped


Solution 2:

Try this:

$.noConflict();
jQuery(document).ready(function($)){

    $("button").click.function(){

        $("p").text("jquery is still working");
    }

}

Solution 3:

before: you need declare this: var $j = jQuery.noConflict();

and... you must don't use $() any more

instead:

use $j()

example:

// Use jQuery via $j(...)
$j(document).ready(function() {
    $j("div").hide();
});

that's all


Solution 4:

read new documentation about ajax in dynaform in this

or

Write this function

function ajax(url, callback, error, method, cache, async) {
    async = async || true;
    //alert(cache);
    if (typeof(cache) == 'undefined') {
        cache = false;
    }
    if (typeof(method) == 'undefined') {
        method = 'GET';
    }
    if (window.XMLHttpRequest) // code for IE7+, Firefox, Chrome, Opera, Safari
    {
        xmlhttp = new XMLHttpRequest();
    } else // code for IE5, IE6
    {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange = function() {

        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {
                if (typeof(callback) == 'function') {
                    callback(xmlhttp.responseText);
                }

            } else {

                if (typeof(error) == 'function') {
                    error(xmlhttp.status);
                } else {
                    alert('خطا : لطفا مجددا تلاش کنید.');
                }


            }


        }

    }
    var d = new Date();
    var n = d.getTime();
    var getExplode = url.split("?");
    scriptName = url;
    param = '';
    if (getExplode.length > 1) {
        scriptName = getExplode[0];
        param = getExplode[1];
        if (cache == false) {
            param = param + "&n=" + n;
        }

    } else {
        if (cache == false) {
            param = param + "n=" + n;
        }
    }

    if (method.toLowerCase() == 'post') {
        xmlhttp.open("POST", scriptName, async);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send(param);

    } else {
        xmlhttp.open("GET", scriptName + '?' + param, async);
        xmlhttp.send();
    }



}

and use it like this

var url = ajaxUrl + "OperationRenovation.php?Command=GetDetail&IdDarkhast=" + ID + "&Code=" + Code + "&Mabna=" + Mabna;
ajax(url, function(Response) {
    alert(response);
}, function() {
    alert('مشکل در برقراری ارتباط با سرور');
}, 'post');

Post a Comment for "Jquery Ajaxing In Processmaker"