You're right, there are security concerns... this is on our corporate
intranet - I have a captive audience and they know they can trust the
content. In the short time it took someone to reply, I have figured out my
problem. For reference here is what I did:
in the <head> section...
<script language="JavaScript">
function populateit() {
form1.archive.value = document.DirBrowse.BrowseDir()
}
</script>
...snip... in the <body>
<! This is the browse control>
<PRE>
<OBJECT classid="clsid:9AB43B98-DAE3-11D6-B928-00B0D0597E87"
codeBase="http://<%=Request.ServerVariables("SERVER_NAME")%>/fnwebadm/dirbrowse.ocx"
height=0 width=0 id="DirBrowse">
</OBJECT>
</PRE>
<form action="unknown.asp" method=POST name=form1>
<table border=0>
<tr>
<td valign=top>Archive Directory:</td>
<td align=right valign=top><input type=text name=archive size=50></td>
<td valign=top><input type=button value="Browse"
onclick="populateit();"></td>
</tr>
</table>
</form>
Can you see any major problems with this implementation?
Thanks!!
Jesse
At 02:48 PM 10/8/02, you wrote:
>Are you trying to view the directory on the client side? Remember that
>VBScript is missing some capabilities that VB has, and for some very good
>reasons. Namely protecting users form unauthorized use of their machines.
>In other words, you may not be able to get there from here.
>
>There are ways to traverse a clients directory tree, thought you are limited
>in what you can do with it. What exactly are you trying to accomplish?
>
>Diane
>
>-----Original Message-----
>From: Jesse Quijano [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 08, 2002 5:05 PM
>To: ActiveServerPages
>Subject: OCX Question
>
>Hello!
>I'm guessing that this isn't a difficult problem, but since I've not done
>it myself, it is tough for me! I have a small vb OCX that does directory
>browsing, when you click OK, it returns the directory path. Works great in
>VB. ;)
>Now the trick is to use this control in an Active Server Page. I have the
>following:
>
><object classid="clsid:9AB43B98-DAE3-11D6-B928-00B0D0597E87" width="70"
>height="30" id="DirBrowse.DBrowse" codebase="http://mypage/my.ocx"></object>
>
>to define my ocx, but now the tricky part (for me)... the method I need to
>execute is BrowseDir(), what is the calling convention for executing this
>control at the client-side? How can the parameter be passed back to
>populate a field on the form?
>
>I've rebooted the server enough times today with my trial and error, it's
>time to ask the experts. :) Any help is appreciated.
>
>Thanks,
>Jesse
>
>
>---
>You are currently subscribed to activeserverpages as:
>[EMAIL PROTECTED]
>To unsubscribe send a blank email to
>%%email.unsub%%
>
>
>---
>You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to
>%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]