Berkeley CSUA MOTD:Entry 15263
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/11/23 [General] UID:1000 Activity:popular
11/23   

1999/1/20-23 [Computer/SW/Languages/Web] UID:15263 Activity:kinda low
1/20    A quick question: how can I create a link in html or javascript
        so that whenever user clicks on the link, it will launch an
        executable program? One solution I have in mind is to wrap the
        executable into an ActiveX control. But is there any other way
        I can do it? Otherwise, how can I wrap the executable into a
        Active X control? I'm fairly new to ActiveX and VB, any help are
        appreciated. -bkong
        \_ So do you want a general solution or a windows only solution?
        \_ I'd be really scared if this was actually possible to do.  Think
           of all the webserver based security hacks you could do!
           \_ it's totally possible to do.  It's also incredibly dangerous.
                remember the "Outer-Limits" control that erases your hard
                drive and opens your CD-ROM, saying "here's your cup holder"?
                No joke.  It really happened.  It can happen.  Courtesy of
                MS OLE.
        \_ Wrap it inside any CGI program or a servlet.  Have your CGI
           program or servlet make a system call to the executable.  Your
           link will just point to the CGI/servlet wrapper.
           \_ I'd have to agree.  Writing server-side logic is the far superior
                solution.  Plus with servlets you can whip up a fast little
                program.  If you have the time, code yer CGI in C.  The
                NCSA has a bunch of publicly-available CGI libraries, all
                in ANSI/ISO C, very sexy.   -brain
                \_ and these run on the client machine and not the server?
                        \_ ummm... no.  You'll have to use hidden form fields,
                           Java Applets, or JavaScript to retain state.  It
                           need not be a very large client presence.  But
                           this gets you:
                                * runnability on older and non-MS browsers
                                * security
                                * smaller downloads than ActiveX components
                           ...but if you really need complex things running
                           (like too big for the client) then you can always
                           slap some Java IDL or Enterprise Java Beans
                           technology onto the application. The client gets
                           downloaded, makes a request to the component on the
                           server, which does all the work...   -brain