Idea I need help materializing

jrmy

New Member
OK, so I bought a domain and I've been brainstorming what to do with it at first. I came up with this idea and I'm not sure if it is possible so I'm throwing this out there to people who know web design. This seems like a very simple design in theory, and I'm definitely not looking for any fancy design at all yet.

What I would like to do is, create a very simple page with a small box in the top right that looks and acts as a command prompt. I would like to be able to type and enter commands into this command prompt and the web page react and open a corresponding page.

Example:

I type and enter the command "contact" in the command prompt. The web page opens (not a popup) and window to the right with all the contact information basically now displaying the page. Other commands would be for example "contact close" and the page will then disappear.



Is this possible and what steps would I need to go through to make this happen? Is there a certain language I need to start looking into like javascript, php, etc?


Any guidance would be very helpful, like I said. I just want to be able to throw a page together where only the people who know the commands can open the pages.

Thanks in advance for any input,

Jeremy
 

ronaldroe

Super Moderator
Staff member
This has been done, so it's certainly possible. In fact, there are sites, like koding.com and cloud9.io that have in-browser bash command lines.

I would venture, though I don't know for sure that with javascript, some ajax magic and some kind of server-side scripting language (PHP, Ruby, ASP, etc.) you could make something like this happen.
 

leroy30

New Member
with javascript, some ajax magic and some kind of server-side scripting language

It depends on your reason why you want this feature, and your future scope of features etc.

Sending the code entered to the server, parsing it, and returning a response is going to be the most secure and scalable method; yet the most overhead.

Whereas doing everything client-side (i.e. javascript) will lighten your server load by doing all the work on the users device.

The latter I would not recommend unless you are planning on limited server resources AND a large user-base AND very basic set of commands that will always do the same thing.

Sounds like a good project!
 

chrishirst

Well-Known Member
Staff member
With javascript ALL the available commands would have to be in the source code so they could be parsed and recognised. What you are planning would have to totally server side if you did not want anyone to read the command list.

HOWEVER: All you really need is a form that accepts the command text and passes it to the server in the form of a GET request, if the "command" is recognised you would get a document, if not, a 404 response would be the result. The whole thing could be accomplished using WordPress (other content management systems are available) in about twenty minutes, without javascript and with absolutely no more "server load" than the normal load from ANY CMS.
 
Top