Anyone good woth coding HTML

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
ertao
Posts: 4
Joined: Thu Jan 20, 2011 9:05 pm

Anyone good woth coding HTML

Post by ertao » Thu Jan 20, 2011 9:20 pm

m trying to make a code to get people coming to my site can ping my servers, for some odd reason it wont work. on my site but it works when i directly connect through the html file from my hardrive. heres the code, it basicly does a tracert for you but it wont work.


<html>
<head><title>Traceroute</title>
<HTA:APPLICATION ID="oHTA";
APPLICATIONNAME="Traceroute";
BORDER="thin";
BORDERSTYLE="normal";
SINGLEINSTANCE="no";
>
</head><body bgcolor="#E8E8E8" >
<font size=2 face="Century Gothic, Tahoma, Arial" color="black">
<script language="VBScript" type="text/vbscript">
set objShell = CreateObject("WScript.Shell")
strOut=""
sub traceroute
cmdarg="%comspec% /c tracert.exe " & T1.value
set objExCmd = objShell.Exec(cmdarg)
strOut=objExCmd.StdOut.ReadAll
Set regEx = New RegExp
regEx.Pattern = "[fnrv]+"
regEx.Global = True
regEx.Multiline = True
strOut = regEx.Replace(strOut, "<br>")
TraceOut.innerHTML= strOut
end sub
//-->
</script>
<p><b>Ping Test by FastPings.com (4/15/2008)</b><hr noshode color="#000000"><br>
<p> IP Address: <input type="text" size="40" name="T1">
<input type="submit" name="B1" value="Submit" onclick="traceroute"></p>
<div id=TraceOut></div>
<script language="JavaScript">
<!--
if (window.resizeTo) self.resizeTo(600,400);
//-->
</script>

User avatar
ertao
Posts: 4
Joined: Thu Jan 20, 2011 9:05 pm

Anyone good woth coding HTML

Post by ertao » Thu Jan 20, 2011 9:20 pm

m trying to make a code to get people coming to my site can ping my servers, for some odd reason it wont work. on my site but it works when i directly connect through the html file from my hardrive. heres the code, it basicly does a tracert for you but it wont work.


<html>
<head><title>Traceroute</title>
<HTA:APPLICATION ID="oHTA";
APPLICATIONNAME="Traceroute";
BORDER="thin";
BORDERSTYLE="normal";
SINGLEINSTANCE="no";
>
</head><body bgcolor="#E8E8E8" >
<font size=2 face="Century Gothic, Tahoma, Arial" color="black">
<script language="VBScript" type="text/vbscript">
set objShell = CreateObject("WScript.Shell")
strOut=""
sub traceroute
cmdarg="%comspec% /c tracert.exe " & T1.value
set objExCmd = objShell.Exec(cmdarg)
strOut=objExCmd.StdOut.ReadAll
Set regEx = New RegExp
regEx.Pattern = "[fnrv]+"
regEx.Global = True
regEx.Multiline = True
strOut = regEx.Replace(strOut, "<br>")
TraceOut.innerHTML= strOut
end sub
//-->
</script>
<p><b>Ping Test by FastPings.com (4/15/2008)</b><hr noshode color="#000000"><br>
<p> IP Address: <input type="text" size="40" name="T1">
<input type="submit" name="B1" value="Submit" onclick="traceroute"></p>
<div id=TraceOut></div>
<script language="JavaScript">
<!--
if (window.resizeTo) self.resizeTo(600,400);
//-->
</script>

jvierra
Posts: 13939
Joined: Tue May 22, 2007 9:57 am
Contact:

Anyone good woth coding HTML

Post by jvierra » Fri Jan 21, 2011 1:39 am

YOu cannot run an HTA from a web site. It will only run locally.

Sorry

An HTA cannot be run remotely due to browser restrictions.

'Submit' buttons and forms do now work in an HTA.

Locked