moreli
September 17th, 2006, 12:56 AM
I'm trying to add a payload option to the events page of theweb server. I've added the various code to the following files:
events.html
added <input type="text" name="payload" value="123" id="Payload">
and modified <a href="" OnClick='return SendEventByID("Event","Device","Payload");'
Modified function SendEventByID( EventID, DeviceID, PayloadID )
{
var Event = document.getElementById(EventID);
var Device = document.getElementById(DeviceID);
var Payload = document.getElementById(PayloadID);
SendEvent(Event.value, Device.value, Payload.value);
return false;
}
In Girder.js
function SendEvent( event, device, payload )
formRequester.open("GET", "ajax_sendevent.lhtml?event="+event+"&device="+device+"&device="+device);
And in ajax_sendevent.lhtml
gir.TriggerEvent( table['event'], table['device'], table['payload'])
I can see that the event is triggered in Girder but the payload is not delivered, but I can't find any other place to add the payload to the code.
Any help will be greatly appreciated!
events.html
added <input type="text" name="payload" value="123" id="Payload">
and modified <a href="" OnClick='return SendEventByID("Event","Device","Payload");'
Modified function SendEventByID( EventID, DeviceID, PayloadID )
{
var Event = document.getElementById(EventID);
var Device = document.getElementById(DeviceID);
var Payload = document.getElementById(PayloadID);
SendEvent(Event.value, Device.value, Payload.value);
return false;
}
In Girder.js
function SendEvent( event, device, payload )
formRequester.open("GET", "ajax_sendevent.lhtml?event="+event+"&device="+device+"&device="+device);
And in ajax_sendevent.lhtml
gir.TriggerEvent( table['event'], table['device'], table['payload'])
I can see that the event is triggered in Girder but the payload is not delivered, but I can't find any other place to add the payload to the code.
Any help will be greatly appreciated!