Horje
jquery generate post entire page Code Example
jquery generate post entire page
function postData(actionUrl, method, data) {
    var mapForm = $('<form id="mapform" action="' + actionUrl + '" method="' + method.toLowerCase() + '"></form>');
    for (var key in data) {
        if (data.hasOwnProperty(key)) {
            mapForm.append('<input type="hidden" name="' + key + '" id="' + key + '" value="' + data[key] + '" />');
        }
    }
    $('body').append(mapForm);
    mapForm.submit();
}

var data= { 'property1': 666, 'property2': 'I am a boy' };
postData('http://urltopostdata.to', 'post', data);





Javascript

Related
how can we give the index of an array as an ID to an element Code Example how can we give the index of an array as an ID to an element Code Example
veu js vs angular vs react features Code Example veu js vs angular vs react features Code Example
Error: ENOENT: no such file or directory, scandir Code Example Error: ENOENT: no such file or directory, scandir Code Example
how to pass function arguments without invoke the function Code Example how to pass function arguments without invoke the function Code Example
buffer to base 64 online Code Example buffer to base 64 online Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7