function trx_addons_add_to_url(loc, prm) {
    "use strict";
    var ignore_empty = arguments[2] !== undefined ? arguments[2] : true;
    var q = loc.indexOf('?');
    var attr = {};
    if (q > 0) {
        var qq = loc.substr(q+1).split('&');
        var parts = '';
        for (var i=0; i<qq.length; i++) {
            var parts = qq[i].split('=');
            attr[parts[0]] = parts.length>1 ? parts[1] : ''; 
        }
    }
    for (var p in prm) {
        attr[p] = prm[p];
    }
    loc = (q > 0 ? loc.substr(0, q) : loc) + '?';
    var i = 0;
    for (p in attr) {
        if (ignore_empty && attr[p]=='') continue;
        loc += (i++ > 0 ? '&' : '') + p + '=' + attr[p];
    }
    return loc;
}
// Add/Change arguments to the url address
Add/Change arguments to the url address
Add / Change arguments to the url address
function trx_addons_add_to_url(loc, prm) {
    "use strict";
    var ignore_empty = arguments[2] !== undefined ? arguments[2] : true;
    var q = loc.indexOf('?');
    var attr = {};
    if (q > 0) {
        var qq = loc.substr(q+1).split('&');
        var parts = '';
        for (var i=0; i<qq.length; i++) {
            var parts = qq[i].split('=');
            attr[parts[0]] = parts.length>1 ? parts[1] : ''; 
        }
    }
    for (var p in prm) {
        attr[p] = prm[p];
    }
    loc = (q > 0 ? loc.substr(0, q) : loc) + '?';
    var i = 0;
    for (p in attr) {
        if (ignore_empty && attr[p]=='') continue;
        loc += (i++ > 0 ? '&' : '') + p + '=' + attr[p];
    }
    return loc;
}
function trx_addons_add_to_url ( loc , prm ) { "use strict" ; var ignore_empty = arguments [ 2 ] !== undefined ? arguments [ 2 ] : true ; var q = loc . indexOf ( '?' ) ; var attr = { } ; if ( q > 0 ) { var qq = loc . substr ( q + 1 ) . split ( '&' ) ; var parts = '' ; for ( var i = 0 ; i < qq . length ; i ++ ) { var parts = qq [ i ] . split ( '=' ) ; attr [ parts [ 0 ] ] = parts . length > 1 ? parts [ 1 ] : '' ; } } for ( var p in prm ) { attr [ p ] = prm [ p ] ; } loc = ( q > 0 ? loc . substr ( 0 , q ) : loc ) + '?' ; var i = 0 ; for ( p in attr ) { if ( ignore_empty && attr [ p ] == '' ) continue ; loc += ( i ++ > 0 ? '&' : '' ) + p + '=' + attr [ p ] ; } return loc ; }
Add/Change arguments to the url address
Add / Change arguments to the url address