SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Oct 2000
    Location
    ca,sunny wale,USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GetFocus() Gives Error...

    Hi,
    I am trying to get the object that has the focus on the page and it gives me GetFocus not defined error..

    eg: I am entering a <Tab> key in a TextField and want to get the next object that has focus...

    here's the sample code..
    window w3,w4
    [ ] this.TypeKeys("<Tab>")
    [ ] w3 = this.GetParent()
    [ ] w4 = w3.GetFocus()

    Any Clues....

    ------------------
    Purnima
    Purnima

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetFocus() Gives Error...

    GetFocus only works on a WINDOW/DIALOG. Based on your example, if THIS is a textfield and it too has a parent (defined as GrandParent.Parent.theTextField, or more life like is window.pagelist.textfield) the result of THIS.GetParent() is acutally GrandParent.Parent. So you cannot do a GetFocus on that...only on the GrandParent. Best bet is to print out what w3 equals and it can only be GrandParent. (window or dialog) If you wanna find the grandparent, use
    [WINDOW]getTextField([STRING]this,".",1)
    method to get the first item in the window name as a string.

    Anthony Pontoriero

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:42 PM.

Copyright BetaSoft Inc.