jayo Posted January 18, 2007 Share Posted January 18, 2007 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 https://forums.phpfreaks.com/topic/34799-php-com-services-how-to-use-it/ Share on other sites More sharing options...
darkcarnival Posted January 19, 2007 Share Posted January 19, 2007 you'd get a better response if this was posted on the [b]php help[/b] forum instead of the javascript forum ;)either tell a mod to move this or re-post this message. Link to comment https://forums.phpfreaks.com/topic/34799-php-com-services-how-to-use-it/#findComment-164656 Share on other sites More sharing options...
jayo Posted January 19, 2007 Author Share Posted January 19, 2007 bump Link to comment https://forums.phpfreaks.com/topic/34799-php-com-services-how-to-use-it/#findComment-164669 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.