BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Validations in Internet Express

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
hifni
Guest





PostPosted: Tue Apr 20, 2004 6:58 am    Post subject: Validations in Internet Express Reply with quote




Hi,
I'm a newbie to Web & Internet applications. I want to know how can i write the code to validate the field before being posted.
Pls. I kindly request from anyone to make it more easier to understand as I'm a new kid to this.

Awaiting response in anticipation.

Thanx,
Hifni
Back to top
AdamStefanCosta
Guest





PostPosted: Sat Apr 24, 2004 5:26 pm    Post subject: Re: Validations in Internet Express Reply with quote



Hi Hifni

As you can see, InternetExpress don't have many adetps...But for me, it's
The Best Borland's Web Development environment.

To explore the full power off InternetExpress, you must examine the
JavaScripts (xmldb.js & xmldisp.js).

In this units, you can find functions to insert custom calls for your
validations, build your own, and more. It´s depend off your
interests/persistence/capabilities.

You can redirect procedures like the follow:

XmlBrokerObject_RS.org_BeforePost=XmlBrokerObject_RS.BeforePost.valueOf();//
save the original function's address
XmlBrokerObject_RS.BeforePost=_BeforePost;//your function where you can put
custom codes

function _BeforePost(a,r){if (a!=2)
// the "a" parameter defines the operation: insert, update, delete
// the "r" parameter is an array that define new values to be posted on
memory xmlrowset
{
sError = '';
if (dfObject.DESCRICAO_VERSAOPRODUTO.value == '') sError = 'A
"Descrição" deve ser informada.';
else if (dfObject.COD_UNIDADEBASE.value == '') sError = 'A "Unidade
Base" deve ser informada.';
else if (dfObject.COD_MOEDA_CUSTO.value == '') sError = 'A "Moeda Preço
de Custo" deve ser informada.';
else if (dfObject.COD_MOEDA_VENDA.value == '') sError = 'A "Moeda Preço
de Venda" deve ser informada.';
if (sError != ''){alert(sError);return null;}
}
return this.org_BeforePost(a,r);
}

The code above make validation on input values. The function (event)
BeforePost is called when new operations (insert, update, delete) are
performed on in-memory xmlrowset.

With extended knowledge of this javascripts, you can build complex web
applications, with several Master/Details ***INPUT*** forms, validation
rules, dynamic capabilities ever seem...

You must be a hacker (in good sence of word) to explore the total potential
of InternetExpress. And I say to you, with InternetExpress I can do anything
in database driven webapplications.

HTH
AdamStefanCosta



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.