Please help, I am desperate!
On my web html-php-mysql page, I use vbscript to execute method calls to an
automation server (Dephi 7, apartment threaded, out-of-process)
for a document imaging application. I can execute the methods via vbs fine
when I use an html form element which has an event, such as onKeyDown,
onClick, etc.
I want to move some button functions to a popup menu I created using
UltraMenu.
For each menu item, UltraMenu provides a link input area to execute code
corresponding to the corresponding menu item(s).
I used this:
http://localhost/resume3/vchrAdd.php?id=8. The "8" is an action flag to
execute the above vbs script.
In php:
if ($action==8) {
$scripter = new COM("MSScriptControl.ScriptControl");
$scripter->Language = "vbscript";
$k = $scripter->eval("UnBusyInvoice()"); <<-- both double and single
quotes fail.
print "Result: $k\n";
$scripter = null;
}
This code throws an error:
Fatal error: Uncaught exception 'com_exception' with message
Source: Microsoft VBScript runtime error
Description:Type mismatch: 'UnBusyInvoice'' in
C:\wamp\www\resume3\vchrAdd.php:207
Stack trace: #0
C:\wamp\www\resume3\vchrAdd.php(207): com->eval('UnBusyInvoice()') #1 {main}
thrown in
C:\wamp\www\resume3\vchrAdd.php on line 207
1. Is there a way to execute the subroutine in html, but use an action event
that ALWAYS executes vs. onClick="vbs

o_Something()" which requires a person
to do something?
if ($action==8) {
?>
-->>> enter html code to execute ( vbs:UnBusyInvoice() ) automatically
w/o an onClick event
<?
}
2. Or is there a cleaner way I can execute the vbs subroutine
UnBusyInvoice() which resides in the <head></head> section.
Some crazy html like:
<input name="unBusyInv" id="unBusyInv" onAlwaysDoThis="vbs:UnBusyInvoice()"
class="btn-filler-blue" value="UnBusy Invoice" type="text">
Thanks much.