var items = { name: 'form_name', addr: 'form_addr', subj: 'form_subj', text: 'form_text', }; var server = getServer(); var xhrSend = new XMLHttpRequest(); // Returns the server's base URI based on the user's script tag // return: the SMAM server's base URI function getServer() { var scripts = document.getElementsByTagName('script'); // Parsing all the