LHudson73
10-03-2005, 09:28 AM
Here is the situation: My client has a vendor. The client places a lot of orders from the vendor's ASP web page (100s per week), but the vendor will not automate the client's process so they asked me to do it. The vendor has approved but I cannot modify their web page in any way.
Here is an example:
<HTML>
<BODY>
<FORM name="frm">
<INPUT name="btnTest" value="test" type="button" onclick=test() style="WIDTH: 118px; HEIGHT: 24px" size=69>
<INPUT name="urlTest" value="http://165.91.236.223/">
</FORM>
</BODY>
</HTML>
<SCRIPT>
function test()
{
winTest = window.open(frm.urlTest.value)
alert(winTest.location)
}
</SCRIPT>
Now, if you put an address on your LAN in the text box and then click the button, you get the alert. However if you put the vendor's web address, or any web address, such as http://webdeveloper.com, you get the "Access is Denied" error message.
The vendor's website is not much more than this:
<FORM name="frm" method="post" action="acceptfile.asp">
<INPUT type="file" name="updoc" title="updoc" value="" tabindex="1">
<INPUT type="submit" name="Upload" title="upload button" value="Upload" tabindex="2">
</FORM>
Where my client uploads an order form. The idea was to do something like this:
function vendorSiteLogin()
{
// User must log in to the vendor site first.
win = window.open ("https://myclientsvendor.com/loginpage.asp")
}
function xMitFile(filename)
{
// User clicks a button after logging in.
win.document.location = "http://myclientsvendor.com/acceptfile.asp"
win.document.frm.updoc.value = filename
win.document.frm.submit()
}
Now I understand that this is next to impossible due to the security features of IE 6.0. However if anyone can figure it out or a suitable work-around, I'm offering a gift certificate to Amazon or Ebay, your choice. It doesn't have to be javascript; it just has to be something I can implement on the fly.
L
Here is an example:
<HTML>
<BODY>
<FORM name="frm">
<INPUT name="btnTest" value="test" type="button" onclick=test() style="WIDTH: 118px; HEIGHT: 24px" size=69>
<INPUT name="urlTest" value="http://165.91.236.223/">
</FORM>
</BODY>
</HTML>
<SCRIPT>
function test()
{
winTest = window.open(frm.urlTest.value)
alert(winTest.location)
}
</SCRIPT>
Now, if you put an address on your LAN in the text box and then click the button, you get the alert. However if you put the vendor's web address, or any web address, such as http://webdeveloper.com, you get the "Access is Denied" error message.
The vendor's website is not much more than this:
<FORM name="frm" method="post" action="acceptfile.asp">
<INPUT type="file" name="updoc" title="updoc" value="" tabindex="1">
<INPUT type="submit" name="Upload" title="upload button" value="Upload" tabindex="2">
</FORM>
Where my client uploads an order form. The idea was to do something like this:
function vendorSiteLogin()
{
// User must log in to the vendor site first.
win = window.open ("https://myclientsvendor.com/loginpage.asp")
}
function xMitFile(filename)
{
// User clicks a button after logging in.
win.document.location = "http://myclientsvendor.com/acceptfile.asp"
win.document.frm.updoc.value = filename
win.document.frm.submit()
}
Now I understand that this is next to impossible due to the security features of IE 6.0. However if anyone can figure it out or a suitable work-around, I'm offering a gift certificate to Amazon or Ebay, your choice. It doesn't have to be javascript; it just has to be something I can implement on the fly.
L