@rootOct 15.2018 — #you use .replace() as in https://www.w3schools.com/jsref/met_loc_replace.asp
location.replace ("./booking/complete?bookedtime="+bookedtime+"&doctor_id="+doctor_id+"&reason="+reason+"&condition="+condition); or something like that.
depending on the actual path, if the path is not correct or issued correctly as a relative path, then you are going to still get errors.