Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

console-like interface on a web page using javascript [closed]

I very like MySQLs mysql cli tool and I don't like phpMyAdmin. [IMHO]It's a nice thing for a Windows user, but its not so good when you've used to console.[/IMHO].

What I want is to build a web page containing element with console-like input (for example something like this) which should get input from user, send it to PHP script on back-end and show back-end response.

Back-end script is done (it was the easiest part), but I can't find any library for JavaScript implementing console-like input.

I've tried to examine and modify for my needs example I've provided, but it's too bloated (because doesn't use any libraries) and implements specific thing. Also I would like this element to provide some auto-completion for input.

Any ideas on such JS library?

like image 266
Daniel Avatar asked Jun 22 '10 03:06

Daniel


People also ask

How do I close the console in JavaScript?

js command line# So you loaded the Node REPL console by typing node at the command line, played around with it and want to get back to your OS command line. Press CTRL+ c (even on a Mac, especially on a Mac!), or just call the process. exit() method to exit from the Node console.

How do you console in JavaScript?

In JavaScript, the console is an object which provides access to the browser debugging console. We can open a console in web browser by using: Ctrl + Shift + I for windows and Command + Option + K for Mac. The console object provides us with several different methods, like : log()

Does JavaScript have a console?

The JavaScript console is a command line interface in your browser that can execute snippets of code. When that code snippet is designed to interact with the webpage you are currently on, result can happen that might not have been possible otherwise.

Which JavaScript method is used to write on browser's console?

The log() method writes (logs) a message to the console.


2 Answers

I think you are looking for this: jQueryTerminal

like image 67
user2282623 Avatar answered Sep 22 '22 08:09

user2282623


there is shellinabox - javascript terminal.

EDIT:

There is also library xterm.js that's real terminal emulator.

EDIT 2:

My jQuery Terminal library is useful when you need custom behavior and you can write your code in JS or as backend code, but backend need to be simple input -> output, if you want to run for instance interactive backend commands, like vi or emacs, you need proper tty, for this use xterm.js (or implement that in JavaScript) for any other usage jQuery Terminal is better. It have lot of features and you don't need to run process on the server (listen on a port) which usually is forbidden on shared hostings or GitHub pages.

like image 22
jcubic Avatar answered Sep 22 '22 08:09

jcubic