SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7

Thread: GetParent

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    GetParent

    Hello

    In my script, I need to obtain the parent (container) of an Html Div.
    Example :
    Dim obj As THTMLDiv
    Set obj = Object("Id=XXX", tpAttachNoWait)
    Dim objParent As Object
    Set objParent = GetParent(obj)

    Could you tell me how I can code the function GetParent please ?
    I need that this function works on IE and Firefox.
    Thanks for advance

    Nara20

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetParent

    Using IE DOM you should be able to get this done.
    Suraj

  3. #3
    Junior Member
    Join Date
    Apr 2010
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetParent

    Hello

    Yes I can use DOM for IE :

    Dim o As Object
    Set o = HTMLDiv("SomeDiv").Object.parentElement

    But how to do the same for Firefox ?

    Thanks for advance

  4. #4
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetParent

    It should work the same way. Did you try?

    Dim o As Object
    Set o = MozillaDiv("SomeDiv").Object.parentElement
    Suraj

  5. #5
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetParent

    I am not sure whether 'parentElement' supported by Mozilla DOM or not.
    Not all methods that supported by IE DOM are supoorted by Mozilla DOM.

    Please let us know when you try it whether it is working or not.
    Suraj

  6. #6
    Junior Member
    Join Date
    Apr 2010
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetParent

    Hello

    Thanks for your help

    This code returns Nothing :

    Dim o As Object
    Set o = MozillaDiv("SomeDiv").Object

    Nara

  7. #7
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetParent

    Try getting the object from Browser object instead of Div object and check.
    Suraj

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 02:08 PM.

Copyright BetaSoft Inc.