html - javascript set location sending JSON data -


what i'm trying functional equivalent of setting "location" property in javascript, want sed along json encoded data server. don't want use ajax, want replace page contents whatever server sends back.

i think might able want using form.submit setting form enctype attribute "application/json", don't know how json form data set. possible this?

you send json query component of url:

document.location.href = server_url + "?" + encodeuricomponent(json_string); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -