Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Run Server-Side Code from HTML Button Click

Posted on 2004-10-28
6
Medium Priority
?
186 Views
Last Modified: 2012-08-13
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????

0
Comment
Question by:jfkrueger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 7

Expert Comment

by:rohanbairat3
ID: 12438805
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
 
LVL 2

Author Comment

by:jfkrueger
ID: 12439043
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
 
LVL 7

Expert Comment

by:rohanbairat3
ID: 12439094
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
 
LVL 12

Accepted Solution

by:
kingsfan76 earned 1000 total points
ID: 12439472
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question