dataType setting added to support JSON better

Added the 'dataType' setting to support JSON responses better. Chrome returns

`<pre style="word-wrap: break-word; white-space: pre-wrap;">{"success":true}</pre>`

because innerHTML was used. Using innerText doesn't make JSON.parse fail.