Results 1 to 5 of 5

Thread: Tabbing thru update template problem

  1. #1
    Join Date
    Oct 2002
    Posts
    161

    Tabbing thru update template problem

    I have an update template that is used for both the add process and the update process. Tabbing thru fields whith the add function works properly and positions the cursor at the beginning of the field, but tabbing in the update function always positions the cursor on the second charater, in other words it adds a blank character to the field, which makes all the masks fail because even though they are set as not required, a blank in the SSN field will not pass the edit.

    How can I fix that? Currently I have to click in the SSN field and backspace to delete the blank that was added by the tabbing, to make it pass the not required edit.

    Here is an example, remove the Title under upodate and see how it behaves now when you tab, it always leaves a spece now.

    <script language="vb" runat="server">
    Sub Page_Load(Source as Object, E as EventArgs)
    Dim Update1 As New Tornado.Z()
    With Update1
    .dbUnit = 70
    .dbSkin= 4
    .dbMode = "dual-horiz"
    .dbDSN = Application("Nwind")
    .dbSQL = "Select * From employees"
    .dbGridDisplayFlds = "0,1"
    .dbTextHolder = "Title=Tornado Demo - Normal Update"
    .dbValidatorParams = "code=/tornado/Jars|entry=false"
    .dbEditUpdateFlds = "fi=0|ty=RONOUPdate,4,fi=HireDate|ty=TextCalendar, fi=HomePhone|ty=TEXT|mask=USPHONE|event=both|req=t rue|err=Must be XXX-XXX-XXXX,fi=ReportsTo|ty=SELECTBOX|val=EID|tex=FullNam e,fi=Notes|type=TextArea|tag=COLS=25 ROWS=5"
    .dbEditAddFlds = "fi=0|ty=RONOUPdate,4,fi=HireDate|ty=TextCalendar, fi=HomePhone|ty=TEXT|mask=USPHONE|event=both|req=t rue|err=Must be XXX-XXX-XXXX,fi=ReportsTo|ty=SELECTBOX|val=EID|tex=FullNam e,fi=Notes|type=TextArea|tag=COLS=25 ROWS=5"

    .dbNavigationItem = "top,bottom,prev,next,update,add"
    .dbBookMark = "employees;0"
    .dbCommonTables = "ind=EID,First,FullName|sql=Select employeeid,Firstname,Firstname & ' ' & Lastname from employees"
    .dbLookUpFlds = "fi=EmployeeID|key=EID|look=FullName,fi=ReportsTo| key=EID|look=First"
    .dbUserUpdateTemplate = server.mappath("/tornado/templates/Edit-User-Update.htm")
    .dbTextHolder = "Title=Tornado Demo - Edit Update Using a User Template"
    .dbUseraddTemplate = server.mappath("/tornado/templates/Edit-User-Update.htm")

    .ASPdbNET()
    End With
    End Sub
    </script>
    Last edited by alarabie; 01-27-2003 at 06:22 PM.

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    >>..remove the Title under update and see how it behaves now when you tab, it always leaves a spece now.

    explain what this is?

    During tabs in update, the entire textbox is highlighted. When clear the text box and then tab - curosr is in leftmost position. Cannot duplicate the problem here.

    FK

  3. #3
    Join Date
    Oct 2002
    Posts
    161
    In the example I gave you, update the first record and remove the Title of courtesy an update the record. Now put your cursor on the first field in the update screen and tab, when you get to the Title of courtesy field it now has a blank instead of null (the space is highlighted, by contrast if you do an add, the cursor it tight against the left edge and there is no space).
    If you click in the field it always positions itself to the second character and never to the first, now let say that you had a mask on title of coutesy that said that it had to be Mr or Mrs and it was defined as non required field, even though you never put anything in that field, just tabbing over it puts a space in now it does not match the mask because a space is not equal to Mr or Mrs and non required means null not space. The only way you can get it to match the non required property is to click in the Title of coutesy filed and hit the back space, then click go.

    I'm using Title of courtesy here as an example but in my appliocation I have a mask on the SSN field and it never matches if I tab through the field, if I dont tab through the SSN and click to the field below it it matches my non required property showing me that tabing though it, does add a blank to the field.

    Hope that explains it a little better.

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    Yes, the code place a space there... I'll look into the reason of doing that...


    FK

  5. #5
    Join Date
    Oct 2002
    Posts
    933
    The space is a display dbBlankText and should not be allowed in Editing - fixed (V1.28+).


    FK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •