[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Posting to a page with JavaScript
Sender: daparnin@xxxxxxxxxxxxxx
I'm trying to upload a file to our bank's web site but having problems. In
the past it's worked OK on their old web site but now they are moving to a
new site and want us to send a test file. I have confirmed that I can get
logged in OK with our digital certificate but when I do the
http_url_post_stmf I get a "500 Internal Server Error". When a web site is
made up of JavaScript do you need to post any differently?
The only thing that I've changed from the old, working site to the new one
is the URL. I'm trying to post to https://sft-bcp.wellsfargo.com/ I don't
know JavaScript but based on the HTML/JavaScript below should I be
referencing a different URL or doing something differently? They haven't
been a lot of help. Despite the number of times I tell them I'm doing this
from a program they still tell me to click on things. Arggg! Any advice
would be appreciated.
Dave Parnin
--
Nishikawa Standard Company
Topeka, IN 46571
daparnin@xxxxxxxxxxxxxx
<html>
<head>
<!--STTAG--><TITLE>Secure File Transport Directory Listing
/ </TITLE>
<SCRIPT LANGUAGE="JavaScript">
var stParamActiveX=false
var stParamMD5Check=true
var stParamAutoRestart=true
var stParamServerPing=420
var stParamUseJap=false
<!--STTAG-->stParamUseJap=false
var unicode=false
if(navigator.userAgent.indexOf('Win') != -1)
{
if (navigator.userAgent.indexOf('NT 4.0') != -1)
{
unicode=true;
}
else if (navigator.userAgent.indexOf('NT 5.0') != -1)
{
unicode=true;
}
else if (navigator.userAgent.indexOf('NT 5.1') != -1)
{
unicode=true;
}
else if (navigator.userAgent.indexOf('95') != -1)
{
unicode=false;
}
else if (navigator.userAgent.indexOf('98') != -1)
{
unicode=false;
}
}
if (stParamActiveX)
{
if (stParamUseJap && unicode)
{
document.write("<OBJECT ID=\"stATX\"
CLASSID=\"CLSID:83d45001-5f79-4cfa-9fb1-c192980c677c\" ")
document.write("CODEBASE=\"/html/vcst_ju.CAB#Version=1,0,0,5
\"></OBJECT>")
}
if (stParamUseJap && !unicode)
{
document.write("<OBJECT ID=\"stATX\"
CLASSID=\"CLSID:83d45001-5f79-4cfa-9fb1-c192980c677c\" ")
document.write("CODEBASE=\"/html/vcst_ja.CAB#Version=1,0,0,5
\"></OBJECT>")
}
if (!stParamUseJap && unicode)
{
document.write("<OBJECT ID=\"stATX\"
CLASSID=\"CLSID:38681fbd-d4cc-4a59-a527-b3136db711d3\" ")
document.write("CODEBASE=\"/html/vcst_eu.CAB#Version=1,0,0,5
\"></OBJECT>")
}
if (!stParamUseJap && !unicode)
{
document.write("<OBJECT ID=\"stATX\"
CLASSID=\"CLSID:38681fbd-d4cc-4a59-a527-b3136db711d3\" ")
document.write("CODEBASE=\"/html/vcst_ea.CAB#Version=1,0,0,5
\"></OBJECT>")
}
}
var docCookie=document.cookie
var fdxCookieVal=getCookie("FDX")
var url=document.location;
var hostName=document.domain
var port=getPort()
var pathName=document.location.pathname
var isPfrmWin32=true
var isSecure=false
var isIE=true
var isAscii=false
var lineColor=false
if (navigator.appName.indexOf("Netscape") != -1)
{
isIE = false
}
if (document.location.protocol.indexOf("s") != -1)
{
isSecure = true
}
function PrintFileURL(uri, name, dirFlag, filesize, time, icon)
{
if (!stParamActiveX || !isIE || typeof(stATX)!="object" ||
stATX.object==null)
{
PrintFileURLEx(uri, name, dirFlag, filesize, time, icon, false)
}
else
{
PrintFileURLEx(uri, name, dirFlag, filesize, time, icon, true)
}
}
function PrintUploadForm(uri)
{
if (!stParamActiveX || !isIE || typeof(stATX)!="object" ||
stATX.object==null)
{
document.write("<FORM ENCTYPE=\"multipart/form-data\"
ACTION=\"", uri, "\" METHOD=POST>");
}
else
{
document.write("<FORM ENCTYPE=\"multipart/form-data\"");
document.write(" onsubmit='ActiveXUpload(this,\"", uri,
"\")'>");
}
}
function PrintXferMode(mode)
{
if (!mode)
{
document.write("<TD ALIGN=LEFT> \
<!--STTAG--><INPUT VALUE=\"Set ASCII\" \
TYPE=\"submit\" NAME=\"switch\"> </TD>");
isAscii = false;
}
else
{
document.write("<TD ALIGN=LEFT> \
<!--STTAG--><INPUT VALUE=\"Set Binary\" \
TYPE=\"submit\" NAME=\"switch\"> </TD>");
isAscii = true;
}
}
function ParentDirFunc(name, url)
{
}
function ActiveXTransfer(isUpload, localFile, RemoteFile)
{
var buffer = VBArray(stATX.TransferFile(url, hostName, localFile,
RemoteFile,
fdxCookieVal, isSecure,
isUpload, port,
isAscii, stParamMD5Check,
stParamAutoRestart,
stParamServerPing))
if (buffer.dimensions()==1)
{
var bufferarray = buffer.toArray();
document.write(bufferarray[0]);
return false
}
else
{
document.write("<html></html>");
return true
}
}
function ActiveXUpload(uploadFrom, targetdir)
{
if (uploadFrom.File.value.length != 0)
{
status=ActiveXTransfer(true, uploadFrom.File.value, targetdir)
}
else
{
<!--STTAG-->alert("Please enter a file to upload")
status=true
}
if (status)
{
document.location=pathName + "?T"
}
return true
}
function ActiveXDownload(localFile, remoteFile)
{
var fullPathRemote = pathName + remoteFile
var status=ActiveXTransfer(false, localFile, fullPathRemote)
if (status)
{
document.location=pathName + "?T"
}
return true;
}
function getCookie(name)
{
name += "="
var i = 0
while (i < docCookie.length)
{
var offset = i + name.length
if (docCookie.substring(i, offset) == name)
{
var endstr = docCookie.indexOf(";", offset)
if (endstr == -1) endstr = docCookie.length
return unescape(docCookie.substring(offset, endstr))
}
i = docCookie.indexOf(" ", i ) + 1
if (i == 0) break
}
return null
}
function getPort()
{
var locstr = window.location.href
var str, _port
var AtIndex = locstr.indexOf(':')
var colonLIndex = locstr.lastIndexOf(':')
if (AtIndex != -1 && colonLIndex <= AtIndex)
{
if (document.location.protocol.indexOf("s") != -1)
_port = 443
else
_port = 80
}
else
{
str = locstr.substring(colonLIndex, locstr.length)
_port = str.substring(1, str.indexOf('/'))
}
return _port
}
function PrintFileURLEx(uri, name, dirFlag, filesize, time, icon, flag)
{
var color
var bgcolor
if (lineColor)
{
bgcolor="CCCCCC"
lineColor=false
}
else
{
bgcolor="FFFFFF"
lineColor=true
}
document.write("<TR bgcolor=", bgcolor, " height=25><TD bgcolor=",
bgcolor, " ALIGN=LEFT NOWRAP>");
if (!flag || dirFlag)
{
document.write("<A HREF=\" ", uri)
if (!dirFlag)
document.write("\">")
else
document.write("/?T\">")
}
else
{
document.write("<u><font size=\"2\" color=\"#3333FF\"
onmouseover=\"style.cursor='hand';\"")
document.write("onclick='ActiveXDownload(\"", name, "\",\"",
uri, "\")'>")
}
document.write("<IMG SRC=\"", icon, "\" BORDER=0>")
document.write(name, "</A> </TD>")
if (!dirFlag)
document.write(" <TD NOWRAP ALIGN=LEFT><A class=Text>",
filesize, " </A></TD>")
else
document.write(" <TD NOWRAP ALIGN=LEFT bgcolor=", bgcolor, "
><A class=Text>", "  ", "</A></TD>")
document.write(" <TD NOWRAP ALIGN=LEFT><A class=Text>", time,
"</A></TD>")
if (!dirFlag)
{
document.write(" <TD NOWRAP ALIGN=CENTER bgcolor=", bgcolor, "
> <A class=text HREF=\"", uri, "?O\"")
document.write(" onMouseOver=\"window.status='File
options';return true\">")
document.write("<IMG SRC=\"/icons/options.gif\"
BORDER=0></A></TD>")
}
else
{
document.write(" <TD NOWRAP ALIGN=LEFT bgcolor=", bgcolor, "
>", "  ", "</TD>")
}
document.write("</TR>")
}
</script>
<!--STTAG--><!--English CSS-->
<style TYPE="text/css" name="english">
A:link {font-family: Arial, Helvetica; font-size: 10pt;}
A:active {font-family: Arial, Helvetica; font-size: 10pt;}
A:visited {font-family: Arial, Helvetica; font-size: 10pt;}
A:hover {font-family: Arial, Helvetica; font-size: 10pt;}
a.HeadingValicert
{
color: #666666;
font-family: Arial, Helvetica;
font-size: 18pt;
font-weight: bold;
font-style:italic;
text-decoration: none;
}
a.HeadingST
{
color: #639ACE;
font-family: Arial, Helvetica;
font-size: 18pt;
font-weight: bold;
font-style:none;
text-decoration: none;
}
a.LoginRed
{
color: #993333;
font-family: Arial, Helvetica;
font-size: 12pt;
font-weight: bold;
font-style:none;
text-decoration: none;
}
a.TextBold
{
color: #000000;
font-family: Arial, Helvetica;
font-size: 10pt;
font-weight: bold;
font-style:none;
text-decoration: none;
}
a.Text
{
color: #000000;
font-family: Arial, Helvetica;
font-size: 10pt;
font-style:none;
text-decoration: none;
}
a.TextWhite
{
color: #ffffff;
font-family: Arial, Helvetica;
font-size: 10pt;
font-style:none;
text-decoration: none;
font-weight: bold;
}
TABLE.LoginBGColor{background-color:#639ACE; }
</style>
<!--Do not remove this line from here-->
<!--STTAG--><!--Japanese CSS
<style TYPE="text/css" name="japanese">
A:link {font-family: MS Gothic; font-size: 10pt;}
A:active {font-family: MS Gothic; font-size: 10pt;}
A:visited {font-family: MS Gothic; font-size: 10pt;}
A:hover {font-family: MS Gothic; font-size: 10pt;}
a.HeadingValicert
{
color: #666666;
font-family: MS Gothic;
font-size: 18pt;
font-weight: bold;
font-style:italic;
text-decoration: none;
}
a.HeadingST
{
color: #639ACE;
font-family: MS Gothic;
font-size: 18pt;
font-weight: bold;
font-style:none;
text-decoration: none;
}
a.LoginRed
{
color: #993333;
font-family: MS Gothic;
font-size: 12pt;
font-weight: bold;
font-style:none;
text-decoration: none;
}
a.TextBold
{
color: #000000;
font-family: MS Gothic;
font-size: 10pt;
font-weight: bold;
font-style:none;
text-decoration: none;
}
a.Text
{
color: #000000;
font-family: MS Gothic;
font-size: 10pt;
font-style:none;
text-decoration: none;
}
a.TextWhite
{
color: #ffffff;
font-family: MS Gothic;
font-size: 10pt;
font-style:none;
text-decoration: none;
font-weight: bold;
}
TABLE.LoginBGColor{background-color:#639ACE; }
</style>
<!--Do not remove this line from here-->
</head>
<body topmargin="0" rightmargin="0" marginwidth="0" marginheight="0"
bottommargin="0" leftmargin="0" bgcolor="#ffffff">
<!-- ST Heading and ValiCert Logo -->
<table cellspacing="0" cellpadding="0" border="0" height="60"
width="100%" bgcolor="#e6e6e6">
<tr>
<td cellspacing="0" cellpadding="0" border="0" height="100"
width="400" align="left" bgcolor="#e6e6e6">
<img border="0" alt="" src="/icons/WellsFargoSFT_logo.jpg">
</td>
<td cellspacing="0" cellpadding="0" border="0" width="35%"
valign="middle" align="right" b
gcolor="#e6e6e6">
<!-- <img border="0" alt="" height="57" width="94"
src="/icons/valicert_logo.gif"> -->
</td>
</td>
</tr>
</table>
<table bgcolor="#666666" cellpadding="0"
cellspacing="0" border="0" width="100%">
<tr>
<td height="25" align="left" cellpadding="0"
cellspacing="0" border="0" width="60%" valign="middle">
<a class="TextWhite">
<!--STTAG-->Welcome to your Secure File Transport home directory.
</a>
</td>
<td height="25" align="right" cellpadding="0"
cellspacing="0" border="0" width="40%" valign="middle">
<A CLASS="TextWhite" HREF="/?logout"
onMouseOver="window.status='Logout';return true " style="text-decoration:
none; color: #ffffff;">
<!--STTAG-->Logout
</a>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="80%">
<tr>
<td colspan="5"> </td>
</tr>
</table>
<TABLE BORDER=0 width="80%" align="center">
<TR>
<TD ALIGN="LEFT" width="100%" height="60">
<TABLE BORDER=0>
<TR><TD ALIGN=LEFT>
<A HREF="/?T"><IMG SRC="/icons/dircurr.gif" BORDER=0> /</A>
</TD></TR></TABLE>
<SCRIPT> ParentDirFunc("/", "/") </SCRIPT>
</TD>
</TR>
</TABLE>
<TABLE BORDER=0 width="80%" align="center" >
<tr>
<td colspan="5"> </td>
</tr>
<TR>
<script>PrintUploadForm("/")</script>
<TD ALIGN=LEFT><INPUT TYPE=FILE NAME="File" SIZE=20>
<!--STTAG--><INPUT VALUE="Upload File"
TYPE=SUBMIT></TD>
<TD ALIGN=LEFT> </TD>
</FORM>
<FORM METHOD="POST" ACTION="/"
ENCTYPE="application/x-www-form-urlencoded">
<SCRIPT> PrintXferMode(0) </SCRIPT>
<TD ALIGN=right>
<!--STTAG--><INPUT VALUE="Change Password"
TYPE="submit" NAME="switch"></TD>
</FORM>
</TR>
</TABLE>
<table cellpadding="0" cellspacing="0" border="0" width="80%"
align="center">
<tr>
<td colspan="2"> </td>
</tr>
<tr height="25" bgcolor="#666666">
<td colspan="4">
<a class="TextWhite">
Files
</a>
</td>
</tr>
<tr bgcolor="#CCCCCC" height="25">
<td align="left">
<a class="TextBold">
<!--STTAG-->Name
</a>
</td>
<td align="left">
<a class="TextBold">
<!--STTAG-->Size
[B]
</a>
</td>
<td align="left">
<a class="TextBold">
<!--STTAG-->Date
</a>
</td>
<td align="center">
<a class="TextBold">
<!--STTAG-->File Options
</a>
</td>
</tr>
<SCRIPT>PrintFileURL("outbound", "outbound", 1, "96", "Sep 28
17:19 ", "/icons/dir.gif")</SCRIPT>
<tr>
<td colspan="4" bgcolor="#CCCCCC" cellspacing="0"
cellpadding="0" border="0"> </td>
</tr>
<tr>
<td colspan="4" bgcolor="#ffffff" cellspacing="0"
cellpadding="0" border="0"><br><br><br><br></td>
</tr>
</table>
</body>
</html>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------