Run Server-Side Code from HTML Button Click

Here is what I am trying to do, it may be impossible but I thought I would check with everyone here:

1) When the user clicks the html Button, I need a choose file dialogue box to open up.
2) I have a component for the dialoge box installed on the server.  
3) I want the user to be able to choose a file off of the SERVER and I do not want to have to install the "FileBrowse" .dll file on all the user's machines that will have access to it.

If I could just call a server-side function from the client-side, it would be great.  But nothing is working so far.  Anybody have any ideas????

LVL 2
jfkruegerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
kingsfan76Connect With a Mentor Commented:
It is possible to do it, by using <iframe>

--- testFunction.asp ---

<%@ Language=VBScript %>
<%
Sub test()
    do something
End Sub
%>

---- Test.asp -----

<HTML>
<script>
function test()
{
   document.getElementById("test_Frame").src = "testFunction.asp";
}
</script>
    <INPUT TYPE="BUTTON" onClick="test()">
    <iframe id="test_Frame" style="display:none">
</HTML>

-----------------

you can pass values through the query string to testFunction.asp if needed.
0
 
rohanbairat3Commented:
If at all you want a user to vie the directory ...might aswell set the directory browsing on for that directory in IIS.

I dont think you can create a dialogue on server and show it on client side :) but u can write your own piece of code to the same function ...just send client the File and Directory names with nice graphics :)

Dont know whether that helped you .
-Rohan
0
 
jfkruegerAuthor Commented:
Thanks for the reply rohanbairat3...

Maybe I should have left out all of the details and just stuck with the issue I am having problems with.  Like I said before, from everything I know about ASP this is impossible, but who knows there may be a solution out there.

<%@ Language=VBScript %>
<%
Sub test()
     do something
End Sub
%>

<HTML>
     <INPUT TYPE="BUTTON" onClick="test()">
</HTML>

I need to call a server side function (test()) from a client-side button.  I do not want to call a client-side function (within <script> tags).

Anybody have a solution????
0
 
rohanbairat3Commented:
Sorry You cannot call a ASp function within a javascript ...The only way is to submit the button to a different page or redirect it ...

-rohan
0
All Courses

From novice to tech pro — start learning today.