I'm working on a fake MS-DOS console. I've made most of the design so far but I need help with programming the prompts. Here's how I would like it to work:
I've managed to restore the <blink> tag ;-) so that will help with an authentic look but ideally, I want the the user to be able to type anything in and his enter. When they do, a new line appears saying "Bad command or filename." and below that, the C:\> appears again and the user is able to continue to type stuff in. I would like to add commands like: "ver" or "dir" which shows some text as in the example above.
Here's the code so far, please copy/paste and try it out:
My problem with FF is I have to jump through hoops to get at least somewhat close to what Vivaldi gives me out of the box, with no real advantage that would make it worth my while. (But hey, apparently there's now at least experimental support for HDR in FF. I mean it's about a decade too late, but still...finally!)
Brave I was never the least interested in, never saw the point, not to mention there's been quite a bit of drama surrounding them over the years.
But I've been a faithful and very happy Opera user all the way back to 2001(ish), so once Vivaldi showed up following that awkward period of time after the key people left Opera and the company was sold, I never really looked back. And they never once made me question my choices.
I see it has more memory, more storage, a better CPU, and a stylus, as you said.
Might be a good alternative. I see some refurbished for $150-200.
I'm not scared of refurnbished, as a lot of parts in my house are refurbished/used. All are working atm.
"TeamViewer is the fast, simple and friendly solution for remote access over the Internet"
Regarding the "friendly" description, has is stopped unceremoniusly booting your session after a couple of minutes accusing you of using it in a commercial environment?!
Question
TonyLock
Can someone help me with some JavaScript?
I'm working on a fake MS-DOS console. I've made most of the design so far but I need help with programming the prompts. Here's how I would like it to work:
I've managed to restore the <blink> tag ;-) so that will help with an authentic look but ideally, I want the the user to be able to type anything in and his enter. When they do, a new line appears saying "Bad command or filename." and below that, the C:\> appears again and the user is able to continue to type stuff in. I would like to add commands like: "ver" or "dir" which shows some text as in the example above.
Here's the code so far, please copy/paste and try it out:
<html> <head> <title>JS-DOS</title> <meta http-equiv="Page-Enter" content="BlendTrans(Duration=0.25)" /> <meta http-equiv="Page-Exit" content="BlendTrans(Duration=0.25)" /> <link rel="shortcut icon" href="/dos/favicon.ico" /> <meta name="robots" content="noindex" /> <style type="text/css" media="all"> BODY{ BackGround: Black; Color: LightGrey; Font-Family: Courier New, Courier; Font-Size: 12pt; Font-Weight: Bold; Padding: 10px; Overflow: Auto; } BLINK{ Color: LightGrey; Font-Size: 13pt; } </style> <script type="text/javascript"> function Blink() { for(i=0;i<document.all.tags('blink').length;i++){ s=document.all.tags('blink')[i]; s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible'; } } setInterval('Blink()',500); </script> </head> <body bgcolor="Black" scroll="Auto"> C:\><span id="Prompt"><blink>_</blink></span> </body> </html>I've experimented with the following JS code but I've had litle success getting my dead around it:
function ProcessKey(){ var KeyID = event.keyCode; var Key = String.fromCharCode(KeyID); //document.getElementById("Prompt").innerText += Key; var _body = document.getElementsByTagName('body') [0]; var _div = document.createElement('span'); var _text = document.createTextNode(Key) _div.appendChild(_text); _body.appendChild(_div); } document.onkeyup = ProcessKey;I'd appreciate any help. Thank you so much.
Link to comment
https://www.neowin.net/forum/topic/798508-js-dos-javascript-fake-html-dos-window/Share on other sites
14 answers to this question
Recommended Posts