Date:  04/03/2006 10:39:29 AM Msg ID:  002900
From:  Ali Koumaiha Thread:  002891
Subject:  Re: how to use messagebox?
Try the function below:
<%Function IESetFocus(cFieldName)%>
   script type="text/javascript">
Sent by Larry Zhang on 04/03/2006 08:22:26 AM:
Thanks, Ali,
I'm not objective to new technology. But I'm used to VFP coding and I believe FoxWeb is designed for people like me.

M.password = Request.Form('Password')

If m.password=""

   Response.Write(m.error_txt)   && it is not a messagebox()

   **----I don't know how to set focus back to password box.

Anybody has a clue?
Sent by Ali Koumaiha on 04/01/2006 08:39:49 AM:
You can create an IESetFocus() funciton that uses javascript to put the focus on that field in that form.
Sent by Larry Zhang on 03/31/2006 12:38:57 PM:
Thank you, Ali,
Is it possible we also focus on the field that requires a value?
Sent by Ali Koumaiha on 03/31/2006 07:31:44 AM:
I wrote a function that simulates this:
in your fwx script:
<%IEMessagebox("Please enter a valid date")%>
And at the bottom of your script put this...
 FUNCTION IEMessagebox(cText)
  IF EMPTY(cText)
  <Script language= "javascript">
Sent by Larry Zhang on 03/31/2006 06:29:21 AM:
How to use messagebox in like we do in VFP?
I checked the ContactMine2 example. the prompt gets to the top of the screen. I wish to have a pop up warning and the cursor rests in the required field that the user fail to fill in.  Thanks.