Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-07-27 22:41:07
Point:500 Replies:9 POST_ID:829131USER_ID:11059
Topic:
JavaScript;Web Browsers;PHP Scripting Language
one day, I found one updated javascript application code embedded into the webpage I access daily and my apache server php coding could not collect the data information becoz the code is written in javascript, it mean only allow client collect in browser to collect the data. Finally, I solved it by node.js installed in my apached sever and using php command of exec("node myjavscript.js")
-First question is brower can run javascript code if javascript is enabled on browser that is
NOT depended on linux or window system , Right ? In other words, javascript running is
Not related to computer system architecture.
-Seoncd ,node.js installed in my server act as javascript complier similar to the action to C complier.Besides that, I don't find any special on node.js since a lot feaures which can be done on php coding on server and javascript on client. And for http access, we can have apache server instead of node.js run-time background process . Any advise about this subject.
-Finally, When I try to think about " run window command on my browse at client side or home computerr", I don't know how node.js will assist on this from his child_process module. Any comment on this? My this topic question is similar to ask how flash running into browser when flash run-time is installed on our window computer.
Please advise
Duncan
-First question is brower can run javascript code if javascript is enabled on browser that is
NOT depended on linux or window system , Right ? In other words, javascript running is
Not related to computer system architecture.
-Seoncd ,node.js installed in my server act as javascript complier similar to the action to C complier.Besides that, I don't find any special on node.js since a lot feaures which can be done on php coding on server and javascript on client. And for http access, we can have apache server instead of node.js run-time background process . Any advise about this subject.
-Finally, When I try to think about " run window command on my browse at client side or home computerr", I don't know how node.js will assist on this from his child_process module. Any comment on this? My this topic question is similar to ask how flash running into browser when flash run-time is installed on our window computer.
Please advise
Duncan
Expert: Ray Paseur replied at 2024-07-28 07:02:09
Thanks for the points. Glad the dialog was helpful!
Author: duncanb7 replied at 2024-07-28 06:57:22
Although, the answer is not exactly to my question answer . But it triggered me to think again server and client role and jquery.ajax role, and so that I think server and client could be on the same computer not just on different computers
thanks for your replies
Duncan
thanks for your replies
Duncan
Accepted Solution
Expert: Ray Paseur replied at 2024-07-28 06:51:23
500 points EXCELLENT
...similar to Java and flash run-time installed on our client computer which can make communication between window system and browser so that we can run java or flash application on browser.
It sounds quite feasible. I have never used these technologies, but I know that they exist. I've never relied on them because I've heard people express concern about security issues. But security would not be a concern if you were the one in control of the application from end-to-end on your own machine. Author: duncanb7 replied at 2024-07-28 05:58:28
Ray, thanks for your reply and reveiw
My question is posted previously with title of "run window command on browser with javascript and its concept" and with the three questions.
I have done one node.js testing in mins ago where node.js is running on my command cmd.exe shell in which it will listen port 8000 for http request and then run notepad.exe (window command or application) if http request is triggered, and I go to type my computer IP with port 8000 on browse at the same computer , the notepad.exe is triggered on the same computer. That is what I want to know, and the answer to this thread YES, if we can install node.js on the same computer as browser. In other words, we can trigger window command execution through client-side ajax.
The testing is similar to Java and flash run-time installed on our client computer which can make communication between window system and browser so that we can run java or flash application on browser.
You agree it ?
In other method, I can convert node.js as window object library and let browser to call for window and browser communication
Please advise
Duncan
My question is posted previously with title of "run window command on browser with javascript and its concept" and with the three questions.
I have done one node.js testing in mins ago where node.js is running on my command cmd.exe shell in which it will listen port 8000 for http request and then run notepad.exe (window command or application) if http request is triggered, and I go to type my computer IP with port 8000 on browse at the same computer , the notepad.exe is triggered on the same computer. That is what I want to know, and the answer to this thread YES, if we can install node.js on the same computer as browser. In other words, we can trigger window command execution through client-side ajax.
The testing is similar to Java and flash run-time installed on our client computer which can make communication between window system and browser so that we can run java or flash application on browser.
You agree it ?
In other method, I can convert node.js as window object library and let browser to call for window and browser communication
Please advise
Duncan
Expert: Ray Paseur replied at 2024-07-28 05:32:56
I may be misunderstanding the question. Is there a client/server relationship between the browser and the windows computer? It's not uncommon for us to set up a web server on a laptop, develop PHP scripts on the laptop and test them via the locally-installed web server. There is no internet connection involved, but the protocols are still the same.
Author: duncanb7 replied at 2024-07-28 04:13:39
jquery.ajax is communcation between server and client browser. How is it related to "run window command on browser on the same computer " ? Could you advise more ?
Duncan
Duncan
Expert: Ray Paseur replied at 2024-07-28 03:54:09
I think your analogy about Flash is quite apt.
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/A_10712-The-Hello-World-Exercise-with-jQuery-and-PHP.html
ActiveXObject is useful only on IE
Right. jQuery AJAX gives us cross-browser support. This article illustrates the "hello world."http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/A_10712-The-Hello-World-Exercise-with-jQuery-and-PHP.html
Author: duncanb7 replied at 2024-07-28 03:46:16
Thanks for reply and article. And before this post, just think node.js is javascript complier to compiler javascript code at server side, and ask myself why my node.js will have http access module feature if server has http access feature already. After thinking around , the node.js might be useful for data communcation between shell application and browser through http or process access and based on javascript coding. it is similar or sort of the way for adobe flash communcation between flash runtime process (installed on our window) and browser.
For run command on browser, ActiveXObject is useful only on IE and but need to users to set all browser enable setting and that is NOT allowed on other browsers except using its additional add-on
Duncan
For run command on browser, ActiveXObject is useful only on IE and but need to users to set all browser enable setting and that is NOT allowed on other browsers except using its additional add-on
Duncan
Expert: Ray Paseur replied at 2024-07-28 03:12:48
I'm not sure I can answer all of the questions here, but I might be able to give you a head-start. Before you do anything else, please read this article:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/A_11271-Understanding-Client-Server-Protocols-and-Web-Applications.html
JavaScript is a client-side technology. The JavaScript statements are prepared on the server and sent to the browser, in response to an HTTP request. Then the server disconnects. So from the client perspective, the server software does not matter -- as long as valid JavaScript was sent to the client, the client is capable of running it.
Node.JS bends this design a bit by implementing a server-side programming language that looks much like the client-side javaScript language. Node is an event machine for routing many concurrent requests on the server. Think of it as if it were Python or Ruby on Rails. It's not a part of the LAMP stack.
Things like this: "one day, I found one updated javascript application code embedded into the webpage..." usually mean your scripts were hacked. Unless you changed the webpage code, you should find the same thing every day, and when things appear (surprise!) without your direct knowledge and action, you may want to review your security procedures.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/A_11271-Understanding-Client-Server-Protocols-and-Web-Applications.html
JavaScript is a client-side technology. The JavaScript statements are prepared on the server and sent to the browser, in response to an HTTP request. Then the server disconnects. So from the client perspective, the server software does not matter -- as long as valid JavaScript was sent to the client, the client is capable of running it.
Node.JS bends this design a bit by implementing a server-side programming language that looks much like the client-side javaScript language. Node is an event machine for routing many concurrent requests on the server. Think of it as if it were Python or Ruby on Rails. It's not a part of the LAMP stack.
Things like this: "one day, I found one updated javascript application code embedded into the webpage..." usually mean your scripts were hacked. Unless you changed the webpage code, you should find the same thing every day, and when things appear (surprise!) without your direct knowledge and action, you may want to review your security procedures.