Maybe I'm approaching this wrong? Here is simplified version of what
I'm trying to do.
<!DOCTYPE html PUBLIC "-//W4C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"
lang="en">
<head>
<script src="//
ajax.googleapis.com/ajax/libs/jquery/1.7.1/
jquery.min.js" type="text/javascript"></script>
<script type="text/javaScript" src="./apeDir/APE_JSF/Clients/
JavaScript.js"></script>
<script type="text/javaScript" src="./apeDir/APE_JSF/Demos/
config.js"></script>
<script>
var client;
$(document).ready(function(){
client = new APE.Client();
client.load({'channel': '*tapdicom'});
client.addEvent('load', function() {
client.core.start({'name': new
Date().getTime().toString()});
});
client.addEvent('multiPipeCreate', function(pipe) {
client.onRaw('info', function(params) {
console.log('testReturn: '+params.data.testReturn);
});
});
$('#testButton').on('click', function(){
console.log('clicky');
client.addEvent('multiPipeCreate', function(pipe) {
pipe.request.send('getInfo', {'testData': 'ABC'});
});
});
});
</script>
</head>
<body>
<div id='testButton'>click</div>
</body>
</html>
Click the button, console displays message but no event is fired
according to network. It's driving me insane! I had a bit of a hard
time getting the SQL up and running (spider monkey error), finally got
that sorted and converted everything over from my original ajax code
and it was working great from my testing page but as soon as I try to
trigger a send from elsewhere in the code it fails. :(