PDA

View Full Version : how to do method do find on a form



Wim Schimmel
10-Sep-2007, 06:25 AM
How to do programming a method dofind, like button Find (button =) ,
automatic in a ajaxform when page is loaded.

Wim

Harm Wibier
10-Sep-2007, 06:57 AM
Hello Wim,

If the find that should be performed when loading the page is a find by
rowid and the searched record is already known when page is generated on the
server the best way is to put the rowid in statusfield directly like: <input
type="hidden" name="customer__rowid"
value="<%=oCustomer.DDValue("customer.rowid") %>">

Otherwise the find should be programmed using javascript. The best place to
execute custom find code when the page is loaded is in the initForm function
that is called by the framework when it has finished its own initialisation.
The will look something like:

<script type="text/javascript>
function initForm(){
var oVdfForm, oVdfField;
oVdfForm = getVdfControl("customer_form");
oVdfField = oVdfForm.getField("customer__name");

oVdfField.setValue("Piet");
oVdfForm.doFindByField(dfGE, oVdField);
}
</script>

The complete interface of VdfForm is available in the Reference Guide.

--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/

"Wim Schimmel" <info@wschimmel.nl> wrote in message
news:b3BYM158HHA.2312@dacmail.dataaccess.com...
> How to do programming a method dofind, like button Find (button =) ,
> automatic in a ajaxform when page is loaded.
>
> Wim
>

Harm Wibier
14-Sep-2007, 02:00 AM
And now without typing errors:
<script type="text/javascript">

function initForm(){

var oVdfForm, oVdfField;

oVdfForm = getVdfControl("customer_form");

oVdfField = oVdfForm.getField("customer__name");



oVdfField.setValue("Piet");

oVdfForm.doFindByField(dfGE, oVdfField);

}

</script>




--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/


"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:M%23xXEH68HHA.4676@dacmail.dataaccess.com...
> Hello Wim,
>
> If the find that should be performed when loading the page is a find by
> rowid and the searched record is already known when page is generated on
> the server the best way is to put the rowid in statusfield directly like:
> <input type="hidden" name="customer__rowid"
> value="<%=oCustomer.DDValue("customer.rowid") %>">
>
> Otherwise the find should be programmed using javascript. The best place
> to execute custom find code when the page is loaded is in the initForm
> function that is called by the framework when it has finished its own
> initialisation. The will look something like:
>
> <script type="text/javascript>
> function initForm(){
> var oVdfForm, oVdfField;
> oVdfForm = getVdfControl("customer_form");
> oVdfField = oVdfForm.getField("customer__name");
>
> oVdfField.setValue("Piet");
> oVdfForm.doFindByField(dfGE, oVdField);
> }
> </script>
>
> The complete interface of VdfForm is available in the Reference Guide.
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
> "Wim Schimmel" <info@wschimmel.nl> wrote in message
> news:b3BYM158HHA.2312@dacmail.dataaccess.com...
>> How to do programming a method dofind, like button Find (button =) ,
>> automatic in a ajaxform when page is loaded.
>>
>> Wim
>>
>
>

Harm Wibier
14-Sep-2007, 02:00 AM
And now without typing errors:
<script type="text/javascript">

function initForm(){

var oVdfForm, oVdfField;

oVdfForm = getVdfControl("customer_form");

oVdfField = oVdfForm.getField("customer__name");



oVdfField.setValue("Piet");

oVdfForm.doFindByField(dfGE, oVdfField);

}

</script>




--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/


"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:M%23xXEH68HHA.4676@dacmail.dataaccess.com...
> Hello Wim,
>
> If the find that should be performed when loading the page is a find by
> rowid and the searched record is already known when page is generated on
> the server the best way is to put the rowid in statusfield directly like:
> <input type="hidden" name="customer__rowid"
> value="<%=oCustomer.DDValue("customer.rowid") %>">
>
> Otherwise the find should be programmed using javascript. The best place
> to execute custom find code when the page is loaded is in the initForm
> function that is called by the framework when it has finished its own
> initialisation. The will look something like:
>
> <script type="text/javascript>
> function initForm(){
> var oVdfForm, oVdfField;
> oVdfForm = getVdfControl("customer_form");
> oVdfField = oVdfForm.getField("customer__name");
>
> oVdfField.setValue("Piet");
> oVdfForm.doFindByField(dfGE, oVdField);
> }
> </script>
>
> The complete interface of VdfForm is available in the Reference Guide.
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
> "Wim Schimmel" <info@wschimmel.nl> wrote in message
> news:b3BYM158HHA.2312@dacmail.dataaccess.com...
>> How to do programming a method dofind, like button Find (button =) ,
>> automatic in a ajaxform when page is loaded.
>>
>> Wim
>>
>
>

Harm Wibier
14-Sep-2007, 02:01 AM
Now without typing errors:
<script type="text/javascript">
function initForm(){
var oVdfForm, oVdfField;
oVdfForm = getVdfControl("customer_form");
oVdfField = oVdfForm.getField("customer__name");

oVdfField.setValue("Piet");
oVdfForm.doFindByField(dfGE, oVdfField);
}
</script>



--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/


"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:M%23xXEH68HHA.4676@dacmail.dataaccess.com...
> Hello Wim,
>
> If the find that should be performed when loading the page is a find by
> rowid and the searched record is already known when page is generated on
> the server the best way is to put the rowid in statusfield directly like:
> <input type="hidden" name="customer__rowid"
> value="<%=oCustomer.DDValue("customer.rowid") %>">
>
> Otherwise the find should be programmed using javascript. The best place
> to execute custom find code when the page is loaded is in the initForm
> function that is called by the framework when it has finished its own
> initialisation. The will look something like:
>
> <script type="text/javascript>
> function initForm(){
> var oVdfForm, oVdfField;
> oVdfForm = getVdfControl("customer_form");
> oVdfField = oVdfForm.getField("customer__name");
>
> oVdfField.setValue("Piet");
> oVdfForm.doFindByField(dfGE, oVdField);
> }
> </script>
>
> The complete interface of VdfForm is available in the Reference Guide.
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
> "Wim Schimmel" <info@wschimmel.nl> wrote in message
> news:b3BYM158HHA.2312@dacmail.dataaccess.com...
>> How to do programming a method dofind, like button Find (button =) ,
>> automatic in a ajaxform when page is loaded.
>>
>> Wim
>>
>
>