onload = function(){ form = document.createElement('form'); form.action ="url"; form.id="form"; form.target="_blank"; document.body.appendChild(form); form.submit(); }