PDA

View Full Version : Ajax.lhtml



larry
August 13th, 2005, 11:59 AM
No problem sending a event with this code (Posted below Minus the table formatting)
from the Ajax.lhtml file, and no problem changing the Event value and
triggering a second or third seperate event.


<FORM id="eventform" name="eventform">
Event
<INPUT type="text" value="webevent" id="Event">
Device
<INPUT type="text" value="18" id="Device">
Status
<INPUT type="text" id="EventStatus">
<INPUT type="image" name="submit" value="Send Event" src="sendevent.png" border="0">
</FORM>

But having a strugle trying to repeat this code to create a second or third form button
to sent a second or third seperate event
Ex: another form with value="webevent2", another with value="webevent3" etc..
I have giving the 2nd and 3rd forms different
Form id's and Form names
And also declared a second and third var
In the function init() section


function init&#40;&#41; &#123;
var Form&#40;X&#41; = document.getElementById&#40;"eventform"&#41;;
Form&#40;X&#41;.onsubmit = submitEventForm;


But so far, when pressing the 2nd or 3rd "Send Event" form buttons
they only trigger the first form button event and not a second or third event.

Thanks