Jump to content

PHP COM services, How to use it?


jayo

Recommended Posts

I have a COM Server that create an object with PHP, when from the html input sentence using onchange, goes to a javascript function, as parameter the input value, within this value i want to get from the COM Server an answer. From PHP the object is created with new, as:
$coi = new COM("Coi4ImplP.Coi4");
and I can get from the server the answer as:
$hresult=$coi->Empresa($_POST["empresa"]);
$ruta=$coi->Ruta();
$niveles=$coi->Niveles();
$nombree=$coi->Nombre();
but in the input area from the html page in the from like:
<td><input type="text" size="25" name="cuenta[<? echo($n); ?>]" value="<? echo($cuenta[$n]); ?>" onChange="<? echo rdes($cuenta[$n]);?>"></td>

the function is:
    function  rdes(cta){
var <?php global $coi; $k=$coi->Ruta(); echo('$k='.$k); ?>;
alert($k);
}

I get an error in the page, if I change $k=$coi->Ruta(); to $k=5; it works fine.

Can somebody help me please?

Thank you in advance.


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.