You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I used Ajax post request to submit a form and then res.send({info: info}), but ejs can not get the info object to display. I googled and found most of them would like to use res.render() to refresh the page, but I prefer to use Ajax to implement asynchronous refresh. Anybody can help me or is there any better method?
Thanks
The text was updated successfully, but these errors were encountered:
res.send() would usually work, but the two things that stand out is your response is sent under the condition that name and pass are defined and not null. If this condition fails, the router will not send anything, causing the page to appear to be loading until it times out. If this isn’t the issue and you only want to send the info object, you can use res.JSON(info) instead.
When I used Ajax post request to submit a form and then res.send({info: info}), but ejs can not get the info object to display. I googled and found most of them would like to use res.render() to refresh the page, but I prefer to use Ajax to implement asynchronous refresh. Anybody can help me or is there any better method?
Thanks
The text was updated successfully, but these errors were encountered: