How to show popup message using Node.JS
I want to show some kind of popup message from server side javascript code (Node.JS).
exports.ShowPopup = function(req, res){
window.alert("Pradeep");
};
I tried this. But when redirecting to this path I get an error like
"undefined"
So please help me with this. Thanks in Advance.
Concerning
Pradeep Raj. TO
source to share
It's impossible. You cannot control users' browser with server side code.
I think you misunderstood NodeJS. NodeJS is a binary that runs javascript as server side code. It works just like any other scripting language on the server like Python or such.
Have you tried using an object window
that is exclusive to the API (or most) browsers and does not exist in the normal Node. Also you don't have a GUI so you won't be able to accomplish what you are trying to do. To do this, just use regular javascript for the first end.
PS: I'm assuming you meant showing the popup in the browser, right?
source to share