View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
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()
   Response.End

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

 
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:
<htm>
<body>
 
<%IEMessagebox("Please enter a valid date")%>
 
 
And at the bottom of your script put this...
 
<%
 FUNCTION IEMessagebox(cText)
  IF EMPTY(cText)
      RETURN
  ENDIF
 %>
  <Script language= "javascript">
      alert("<%=cText%>")
  </script>
<%ENDFUNC%>
</body>
</html>
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.