Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute a file from ColdFusion

Status
Not open for further replies.

micjohnson

Programmer
Nov 9, 2000
86
0
0
US
Hi there!

I want to execute a file (it is a .rez file, i.e bar code file) from ColdFudion. I tried with <input type=&quot;Submit&quot; name=name1 onClick=&quot;c:/file1.rez&quot;>. But it is not working. My code is,

<form name=&quot;name11&quot; action=&quot;file2.cfm method=&quot;post&quot;>

..
..
..
<input type=&quot;Submit&quot; name=name1 value=&quot;Submit&quot; onClick=&quot;c:/file1.rez&quot;>

Is there any way?

micjohnson
</form>
 
If you want to execute a file on the server you have to use CFEXECUTE, so if you want a button to activate you can do something like this:

Page name= test.cfm

------------------------------------------------------------
<CFIF IsDefined(&quot;Execute&quot;)>
<CFEXECUTE....<-- put the execute code here -->
<CFELSE>
<cfform... action=&quot;test.cfm&quot;....>
<input type=&quot;submit&quot; value=&quot;Submit&quot; Name=&quot;Execute&quot;>
</cfform
</CFIF>
------------------------------------------------------------



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top