To use this website completely, it is necessary to store cookies on your computer.
 

* Navigator

Expand - Collapse

* Statistic

  • *Total Posts: 16404
  • *Total Topics: 2518
  • *Online Today: 8
  • *Most Online: 292
(12. Nov 2016, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 1
  • *Total: 1

  • *Baidu

[free] telnet script in page

Started by johnnyv_nl, 29. Sep 2011, 22:37:53

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

Go Down

johnnyv_nl

29. Sep 2011, 22:37:53
Hello,

just need some advice :-)

Installed portamx a few weeks ago instead of simple portal but can't get the following to work:

I wan't to run ftelnet in a page ( now a direct link to a html page) to fit with the rest of the site.
but it's a mix of html and javascript.
Is this possible to run in a page?
i tried some things but am not a coder..so need some advice from people with more insight.

below the html i am using now.

Thanks, John

___________________________________________________________________________________________________

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>fTelnet &amp; HtmlTerm by Rick Parrish of R&amp;M Software</title>
        <meta http-equiv="Content-Language" content="English" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
        <div id="wrap">
                <div class="middle">
                  <!-- IMPORTANT -->
                    <p style="text-align: center;"><span id="ClientContainer"></span></p> <!-- You can use any id= value you want, just make sure if you rename it here, you rename it below.  You can also use a div or whatever instead of a p if you'd like. -->
                   
                    <script type="text/javascript" src="ClientVars.js"></script>
                    <script type="text/javascript" src="ClientFuncs.js"></script>
                    <script type="text/javascript" src="swfobject.js"></script>
                    <script type="text/javascript" src="HtmlTerm.compiled.js"></script>
                    <script type="text/javascript" src="HtmlTerm.font2.js"></script> <!-- This is optional, and can be commented out if you only want codepage 437 at 9x16 size -->
                    <script type="text/javascript">
                        // Try to use fTelnet
                        swfobject.embedSWF(
                            "fTelnet.swf",
                            "ClientContainer", // Must match the id= value above
                            (location.href.indexOf("file:") === 0) ? 740 : "100%", // NOTE: This is just a hack to make sure the display works locally, in a web environment you'd only use "100%"
                            (location.href.indexOf("file:") === 0) ? 442 : "100%", // NOTE: This is just a hack to make sure the display works locally, in a web environment you'd only use "100%"
                            "10.0.0",
                            "playerProductInstall.swf",
                            ClientVars,
                            { allowfullscreen: "true", allowscriptaccess: "sameDomain", bgcolor: "#ffffff", quality: "high" },
                            { align: "middle", id: "fTelnet", name: "fTelnet", swliveconnect: "true" },
                            function (callbackObj) {
                                if (!callbackObj.success) {
                                    // Failed to use fTelnet, so try to use HtmlTerm
                                    if (!HtmlTerm.Init("ClientContainer", ClientVars)) { // Must match the id= value above
                                        // Failed to use HtmlTerm too
                                        alert("Sorry, I wasn't able to load either fTelnet or HtmlTerm\n\nTry again with Flash 10+ installed (for fTelnet), or with an HTML5 capable browser (for HtmlTerm)");
                                    }
                                }
                            }
                        );
                    </script>
                    <!-- END IMPORTANT -->
                </div>

                <div id="clear"></div>
            </div>

            <div id="bottom"></div>
        </div>
      </body>
</html>

_____________________________________________________________________________________________________
PortaMx 1.51, Smf 2.0.4, Connect Theme, dutch only

feline

#1
30. Sep 2011, 11:28:52
Well .. I can't nothing to say to this code ... I don't know it.
But you can't use the html, header or body tags inside a block code ...
Many are stubborn in relation to the path, a few in relation to the target.

johnnyv_nl

#2
30. Sep 2011, 17:25:13
Quote from: feline on 30. Sep 2011, 11:28:52
Well .. I can't nothing to say to this code ... I don't know it.
But you can't use the html, header or body tags inside a block code ...


Hello feline,

I was afraid of that, on some way i always want the impossible :-)
The code is to startup a terminal  in a browser to log in an oldstyle telnet bulletin board.
they still are there and i still am running one.
but people don't know how to telnet anymore, so this is a solution and it works great

Grtx, John

PortaMx 1.51, Smf 2.0.4, Connect Theme, dutch only

b4pjoe

#3
01. Oct 2011, 03:01:34
Try placing everything between the <body> and </body> in an HTML block and specify the location of the javascript files...or place them in the SMF root folder and the code above should find them.

johnnyv_nl

#4
01. Oct 2011, 17:12:11
Quote from: b4pjoe on 01. Oct 2011, 03:01:34
Try placing everything between the <body> and </body> in an HTML block and specify the location of the javascript files...or place them in the SMF root folder and the code above should find them.


Hi b4pjoe,

Tried it in a HTML page and it worked once.
Seems:
<p style="text-align: center;"><span id="ClientContainer"></span></p> <!-- You can use any id= value you want, just make sure if you rename it here, you rename it below.  You can also use a div or whatever instead of a p if you'd like. -->

Was giving problems (<span id="ClientContainer"></span> disappeared out of the html code).

I changed it to script type and now its working perfect :-)

Thanks for pointing me in the right direction.

Grtx, John
PortaMx 1.51, Smf 2.0.4, Connect Theme, dutch only

b4pjoe

#5
01. Oct 2011, 18:40:02
Good to know. Thanks. Glad you got it working.

Go Up