Windows Vista Forums

HTA: error in this.offset
  1. #1


    HAL07 Guest

    HTA: error in this.offset

    I have the following in a HTA script. We use Office Communicator which gives us this object.

    <script language="JavaScript"> var nameCtrl = new ActiveXObject("Name.NameCtrl");</script>
    <span onmouseover="call nameCtrl.ShowOOUI('sip:user.name@newsgroup',0,parent.offsetLeft,parent.offsetTop)">Hoover here</span>

    However I cannot get the hoover like I can in Internet Explorer (using the same code).
    It gives an error:
    Object doesn't support this property or method: 'parent.offsetLeft'


    --
    -- HAL07, Engineering Services, Norway



      My System SpecsSystem Spec

  2. #2


    Bruce Axtens Guest

    Re: HTA: error in this.offset

    HAL07 wrote:

    > It gives an error:
    > Object doesn't support this property or method: 'parent.offsetLeft'
    >
    >
    My guess is that you would need to refer to the DOM explicitly rather
    than the implicit way you are doing it there.

    Bruce.

      My System SpecsSystem Spec

  3. #3


    HAL07 Guest

    Re: HTA: error in this.offset

    Bruce Axtens wrote:

    > HAL07 wrote:

    >> It gives an error:
    >> Object doesn't support this property or method: 'parent.offsetLeft'
    >>
    >>
    >
    > My guess is that you would need to refer to the DOM explicitly rather
    > than the implicit way you are doing it there.
    >
    > Bruce.
    ok i dont know what you mean. can you give me an example

    --
    -- HAL07, Engineering Services, Norway

      My System SpecsSystem Spec

  4. #4


    Bruce M. Axtens Guest

    Re: HTA: error in this.offset

    HAL07 wrote:

    > ok i dont know what you mean. can you give me an example
    Sub bCopy_Click()
    if sGlobalResult = "" Then
    MsgBox "Can't copy nothing.",,"Broggle"
    Else
    document.parentwindow.clipboardData.SetData "text", sGlobalResult
    End If
    End Sub

    Sub bScreen_Click
    v3.Value = document.body.clientHeight
    v4.Value = document.body.clientWidth
    End Sub

    Sub bNew_Click
    rmlFile = "untitled.rml"
    tMaster.Value = ""
    rmlLoaded = False
    bGlobalResult = ""
    document.title = rmlFile
    End Sub


    In these function in one of my own HTAs notice that I start from
    "document." and work down.

    HTH

    Kind regards,
    Bruce.

      My System SpecsSystem Spec

  5. #5


    Mayayana Guest

    Re: error in this.offset

    It would be better to ask javascript questions in
    the jscript group. HTAs can use VBS or JS, but your
    code sample is JS. For those of us who don't use
    JS there's no way to know whether you have a
    syntax error.


    |I have the following in a HTA script. We use Office Communicator which
    gives us this object.
    |
    | <script language="JavaScript"> var nameCtrl = new
    ActiveXObject("Name.NameCtrl");</script>
    | <span onmouseover="call
    nameCtrl.ShowOOUI('sip:user.name@newsgroup',0,parent.offsetLeft,parent.offsetTop)">Hoover
    here</span>
    |
    | However I cannot get the hoover like I can in Internet Explorer (using the
    same code).
    | It gives an error:
    | Object doesn't support this property or method: 'parent.offsetLeft'
    |
    |
    | --
    | -- HAL07, Engineering Services, Norway



      My System SpecsSystem Spec

HTA: error in this.offset problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing Multipage TIFF file via byte offset in .NET? Luke .NET General 1 04 Feb 2010
Printer offset Gordon Hoskin General Discussion 2 27 Nov 2009
FTP timestamp and offset Problem Jason Vista General 2 28 May 2009
Solved Menus are offset in certain programs LPent General Discussion 5 16 Nov 2008
Information from Exception Offset Dave Vista General 0 21 Mar 2008