Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass underscore to telnet session

Status
Not open for further replies.

MrsMopey

Programmer
Jul 31, 2007
19
Does anyone know how to pass an underscore to a telnet session? right now I have in my code:
Code:
<!--textResult.value = ("SHUT\_USER " ) + (textCoNo.value)+ (textUInit.value);-->

but it displays on the telnet sessions as :
Code:
(volmrs)# SHUT _USER
 
Yes that is what I started with and I still had the square in front, that's why I tried the escape character. I also tried to use the HTML character name(because my page is HTML with a javascript), but that didn't work either.
 
I am using active socket here is the function:

Code:
function Receive ()
					{
						while ( objSocket.HasData () == -1 )
					{
						textReceive.value = textReceive.value + objSocket.ReceiveString ();
					}

						setTimeout("Receive()",1000);
					}

					function Init ()
					{
						Receive ();
						objSocket.Protocol = objConst.asSOCKET_PROTOCOL_TELNET;
						objSocket.Connect ( "volmrs", "23" );
						textResult.value = "CONNECT:" + objSocket.LastError + " (" +objSocket.GetErrorDescription ( objSocket.LastError ) +")";

					}

					function Send ()
					{
						objSocket.SendString ( "root" )
						objSocket.Sleep (500);
						objSocket.SendString ( "mci" );
						objSocket.Sleep (500);

						var strString = ("shut_user ") + (textCoNo.value) + (textUInit.value);
						objSocket.SendString (strString);
						textResult.value = "SEND:" + objSocket.LastError + " (" + objSocket.GetErrorDescription ( objSocket.LastError ) + ")";
					}

					function Disconnect ()
					{
						objSocket.Disconnect ();

						textResult.value = "DISCONNECT:" + objSocket.LastError + " (" + objSocket.GetErrorDescription ( objSocket.LastError ) + ")";
					}
 
Before this line:

Code:
objSocket.SendString (strString);

if you alert "strString", do you see what you expect?

If so, then you might need to ask somewhere more relevant to whatever "objSocket" is...

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top