3.2.0

how to submit a form with a grid after an event ondblclick on a row

Hi, I'm Eric and invenstigating if we can use AW for our application. Testing on version 1.0.

I have created a form with a customers grid. I implemented 2 events methods on the row property: onclick and ondblclick. They both work OK (after seeking help on this forum). With onclick I use AJAX to display more customer data. I tested the ondblclick with an alert. Now I want the ondblclick to send the form (id="form1"). But IE6 gives a prompt: 'document.form1' is empty. I couldn't find a solution on the support forum. I have a button on the form1 that calls the same function doSubmit that works.

I use this code:
...
var eventHandler = function()
{obj.setProperty("selection/index2,this.getRowProperty("index"));
var rowIndex = obj.getSelectionProperty("index");
form1.detail.value = obj.getDataProperty("text",rowIndex,0);
getDetail();};
var row = new Active.Templates.Row;
row.setEvent("onclick",eventHandler);
row.setEvent("ondblclick",function(){this.action("myAction")});
obj.setTemplate("row", row);
obj.setAction(~myAction~,function(src){doSubmit()});
...
function doSubmit(){getSelection();document.form1.submit()};
...
(getSelection gathers the selected row)

Does anybody have a solution? Thanks,

Eric Aarts (the Netherlands)
Eric Aarts (Holland)
November 19,
Hi,

You can use a form transmit:

- fill in the formfields
- send it with form.submit();

or you can send it with a more flexible XMLHTTP way (feedback is better if you use XMLHTTP).

John
John Ophof, http://open-modeling.sourceforge.ent
December 28,

This topic is archived.

See also:


Back to support forum