NetTalk Central

Author Topic: Moving controls  (Read 2671 times)

jvillasenor

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Moving controls
« on: September 05, 2012, 11:32:44 AM »
In the logon form i had 4 lines User, Password, Company and Remeber if i click Logon i get the error (normal) about some of the controls are required this is OK, but the new display is wrong pleas see the attach file any clue?

Thxs

JM Villasenor

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Moving controls
« Reply #1 on: September 05, 2012, 10:54:37 PM »
that is a strange result!
can you tweak an example to give the same effect?

I'm wondering specifically what the settings are for the company field...

jvillasenor

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Moving controls
« Reply #2 on: September 06, 2012, 07:57:40 AM »
Here is the example, i'm use Clarion 8, ok, please compiling and running, in the web page hit Login then in the Login area hit Login and BINGO!!

I hope this help

JM Villasenor

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Moving controls
« Reply #3 on: September 06, 2012, 10:08:14 PM »
Hi JM,

Cool - thanks for the example.
Ok, the problem is in the embed code you've added to the ValidateValue::Loc:Login routine.

Let's cover the bases;

a) you added your embed code to the second embed point in that routine. It would be better to add it to the first embed point, so that it executes before the generated code.

b) you called a Refresh routine from this routine. This is not ideal because this routine is called as the form is completed, but it is also called when the form completes. The better idea is to add the F1:FIRMA_ALIAS field to the reset list of the Login field. This will generate the refresh in the correct place.

c) although commented out, your code for Firma_User(1) failing is over elaborate. There is one missing line there, and two lines that could complicate things.

So in summary, add to the reset list, and put the following code one embed point higher, and you should be good to go;

  IF Firma_User(1)=Level:Benign
     p_web.SetSessionValue('F1:USER_ID',F1:USER_ID)
  Else
    loc:Invalid = 'Loc:Login'   
    Loc:Login:IsInvalid = true
    loc:alert = 'El usuario no existe '& p_web.site.RequiredText
  end


Cheers
Bruce