When a user clicks on a link, I need to update a field in a database and then open the requested link in a new window. The update is no problem, but I don\'t know how to op
This might help
var link = document.createElementNS("http://www.w3.org/1999/xhtml", "a"); link.href = 'http://www.google.com'; link.target = '_blank'; var event = new MouseEvent('click', { 'view': window, 'bubbles': false, 'cancelable': true }); link.dispatchEvent(event);