I managed to dynamically change values on a form using javascript (and an
applet). Check
http://www.onjava.com/lpt/a//onjava/2002/01/23/javascript.html for details.
Maybe we could find a way of incorporating such a solution in dbforms.


> -----Original Message-----
> From: Shawn [SMTP:[EMAIL PROTECTED]
> Sent: 12 July 2003 15:22
> To:   Tomasz soroka
> Cc:   dbf interest
> Subject:      Re: [dbforms] retrieving value from database when change
> value in textbox
> 
> Hello,
> 
> I think you would have to break your form into parts somehow to do that, 
> unless there is a way to get the value of the first textbox in JavaScript 
> and somehow...
> 
> Anyway, I don't think dbforms provides a clean solution to that.  If 
> someone knows of a way, please do let us know.
> 
> As for breaking up your form, I did something like:
> 1) added a interceptor (see usersguide for more details) to pass along the
> 
> values filled in the first part of the form
> 
>  public int preInsert(HttpServletRequest request, Hashtable fieldValues, 
> DbFormsConfig config, Connection con)
> throws ValidationException {
>    request.setAttribute("ClassName",fieldValues.get("name")); return 
> GRANT_OPERATION;
>     }
> 
> 2) then in the second jsp page did
> <%
>       if (request.getAttribute("ClassName")!=null){
> ClassName_stringbuffer.append("class_name="+request.getAttribute("ClassNam
> e") 
> );
> 
> 3) then you could use that to set your query in the select tag
> 
> HOWEVER, in step one -- for me it's ok for that partial data to be entered
> 
> into the database.  You would have to use a pluggableEvent I think to stop
> 
> it from happening and then pass along all the values entered in to the
> next 
> page so they all could be inserted or updated there (update would require 
> it's own interceptor of course).
> 
> Confusing, OK well maybe a little.  Like I said I don't know of a clean
> way 
> to do that, but others may very well have better -- hopefully much better
> - 
> ideas.  Anyone?
> 
> 
> Shawn
> >
> > I have form, where one value depend on second. When user change value in
> 
> > first textbox, I should ask database for value for second textbox. Is it
> 
> > possible to do in dbforms?
> >
> > regards
> > Tomek
> >
> >
> 
> 
> 
> Happily using M2, Opera's revolutionary e-mail client: 
> http://www.opera.com/m2/
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> DbForms Mailing List
> 
> http://www.wap-force.net/dbforms


DISCLAIMER: This email and any files transmitted with it are confidential and intended 
solely for the use of the recipient. Any disclosure, copying or distribution of all or 
part of the information contained herein to or by third parties is prohibited and may 
be unlawful. If you have received this email in error please notify K&M Insurance 
Brokers Ltd through [EMAIL PROTECTED] immediately. In any event the contents herein is 
without prejudice.


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to