473,721 Members | 3,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Telnet emulation with Javascript/dhtml


Does anyone have code they could share that would implement a telnet
session in a browser using Javascript? I've seen it done once, but they
did not have code available. This would be integral to preserving some
old telnet-based software but allowing us to move on with web-only code
at this point.

Thank you in advance to anyone who can assist.

(Ideally, it should be cross-browser, of course).

Rick

Aug 10 '05 #1
6 17170
"Questman" <qu******@UBESU Xthemajorbbs.co m> kirjoitti
viestissä:fA*** **************@ fe80.usenetserv er.com...

Does anyone have code they could share that would implement a telnet
session in a browser using Javascript? I've seen it done once, but they
did not have code available. This would be integral to preserving some
old telnet-based software but allowing us to move on with web-only code at
this point.

Thank you in advance to anyone who can assist.

(Ideally, it should be cross-browser, of course).

Java Applet might be what you need. Javascript does not provide such
functionality unless... Hmm. You could possibly make an AJAX/CGI application
which would use a serverside script to telnet and javascript/xmlRequest to
display the output to the client. Still, I'd start making a Java Applet for
that if I were you.

--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.ber keley.edu/>
Kimmo Laine <et************ ****@5P4Mgmail. com>
Aug 10 '05 #2
Kimmo Laine wrote:
"Questman" <qu******@UBESU Xthemajorbbs.co m> kirjoitti
viestissä:fA*** **************@ fe80.usenetserv er.com...
Does anyone have code they could share that would implement a telnet
session in a browser using Javascript? I've seen it done once, but they
did not have code available. This would be integral to preserving some
old telnet-based software but allowing us to move on with web-only code at
this point.

Thank you in advance to anyone who can assist.

(Ideally, it should be cross-browser, of course).


Java Applet might be what you need. Javascript does not provide such
functionality unless... Hmm. You could possibly make an AJAX/CGI application
which would use a serverside script to telnet and javascript/xmlRequest to
display the output to the client. Still, I'd start making a Java Applet for
that if I were you.


For that matter, if it isn't something that needs intervention, set up a
server-side script (php, asp, etc.) to accept the data that will be sent
via post or something, and have the script execute all the necessary
actions.

--
Justin Koivisto, ZCE - ju****@koivi.co m
http://koivi.com
Aug 10 '05 #3
Kimmo Laine wrote:

Java Applet might be what you need. Javascript does not provide such
functionality unless... Hmm. You could possibly make an AJAX/CGI application
which would use a serverside script to telnet and javascript/xmlRequest to
display the output to the client. Still, I'd start making a Java Applet for
that if I were you.


Hi Kimmo,

The problem with an Applet is that many browsers turn off the
functionality for "security" or performance reasons.

Ideally, the goal to get javascript functionality is to have a stock
browser be able to access this content.

Unfortunately, it also needs interaction...

Here's an example of what I'm talking about doing :

http://www.port42.com/

I've tried contacting these blokes but they do not respond..
So I now wish to develop my own version, but don't really know where to
start.

Rick

Aug 11 '05 #4
"Questman" <qu******@UBESU Xthemajorbbs.co m> kirjoitti
viestissä:a8*** ***********@fe0 7.usenetserver. com...
Kimmo Laine wrote:

Java Applet might be what you need. Javascript does not provide such
functionality unless... Hmm. You could possibly make an AJAX/CGI
application which would use a serverside script to telnet and
javascript/xmlRequest to display the output to the client. Still, I'd
start making a Java Applet for that if I were you.


Hi Kimmo,

The problem with an Applet is that many browsers turn off the
functionality for "security" or performance reasons.

Ideally, the goal to get javascript functionality is to have a stock
browser be able to access this content.


Dude, people turn of Javascript as well. That's like saying you don't like
Britney Spears but do like Christina Aguilera because Britney is a stupid
cow. They're both stupid cows! If you want to really have any given browser
to be able to handle it, using javascript is not going to help you at all.
With both of them you are between a rock and a hard place.

The ultimate solution would be to do it like a chat, where you have two
frames: large top and one row bottom. You type the commands in the bottom
frame and submit it, and the output appears in the top frame if it's done
like a chat page. Then the bottom frame just reloads.

How to do the chat page? You gotta use sme server side programming. The key
is open the page, but never close it. Keep on streaming the output, send
some spaces every now and then to keep the connection alive and poll for new
output. When new output appears like maybe in a text file, stream the
textfile and delete it. Then start polling again if new text has a ppeared.
That's like the stupidest thing I've ever written, but it's the solution
that should work in just about any given browser.

Here's a pseudo code

This for the telnet output :

start_telenet_s ession {
do while(true) {
output_availabl e = poll textfile
if(output_avail able) {
print output
clear textfile
} else {
sleep 1 second
print " "
}
}
}
This is for the bottom frame :

command_recieve d {
execute command
write command output to textfile
reload same page
}

--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.ber keley.edu/>
Kimmo Laine <et************ ****@5P4Mgmail. com>
Aug 11 '05 #5
Yeah there is a open source project that is based off of the work at
http://sarissa.sourceforge.net/ it is called AnyTerm I believe they
even support SSH. http://anyterm.org/

good luck

Aug 11 '05 #6
Nathan White wrote:
Yeah there is a open source project that is based off of the work at
http://sarissa.sourceforge.net/ it is called AnyTerm I believe they
even support SSH. http://anyterm.org/

good luck


THIS IS EXACTLY WHAT I NEEDED.

Thank you, Nathan.

Thanks to those who responded - it is much appreciated.

Rick

Aug 11 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1400
by: Chris Ryan | last post by:
Is there a way to change the displayed text on a web page using some combination of Javascript and DHTML? NOT in a text box. As far as I know (with my limited knowledge) the only way you can do this is with a textbox or images, which is not what I'd like to do. There's gotta be a way to do this, right?
2
1998
by: mr_burns | last post by:
hi there, i would like a book that will explain concepts of javascript and dhtml instead of, for example, ten tutorials on how to do specific things in js or dhtml. ideally a book thats can explain from the basics of javascript, to more complex things such as dhtml and dom onto things like creating javascript objects (if that is possible, but u get the idea). rather than this is how you make a drop down menu tutorial; this is how you
1
1210
by: satyanand | last post by:
hi, Can anybody give me the book and author name which have the combined code and description of "Javascript / DHTML / Ajax" . I need it very much. Thanks..... Satyanand Verma Software Developer VTLGlobal Inc.
1
2797
by: doublestack | last post by:
I have a html file with javascript and am loading information into it with a xml file stored within sharepoint. I am having problems getting the dates to appear correctly, specifically, start date and due dates. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Timeline-WorkPrint</title> <html> <head> ...
3
3498
by: neovantage | last post by:
Hey All, I want to create 3d Scrollbar using javascript/dhtml in my static pages. My 3d scrollbar feel n look you can see from the attached image. I hope to have a solution from this great community professionals. kind regards, Mohsin Rafique
3
1660
by: WPPJames | last post by:
I have a desktop software product (Rmsad.exe) that runs as a process in the background. Periodically, Rmsad.exe makes a call to a .php page (smfeed.php) on my server. One of the parameters it sends over is an URL to load in a DHTML window. Inside smfeed.php, I call a javascript function that displays the DHTML window: var googlewin=dhtmlwindow.open("googlebox", "iframe", '<?php echo $outurl2; ?>', "Title text here", "width=<?php echo...
0
8852
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8736
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6676
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4761
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3206
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2590
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.