Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8375011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:04:08+00:00 2026-06-09T15:04:08+00:00

Is there a public API for accessing the HTML div object of an OpenLaszlo

  • 0

Is there a public API for accessing the HTML div object of an OpenLaszlo view in the DHTML runtime? There doesn’t seem to be an example for that in the OpenLaszlo documentation, but technically it should be possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:04:09+00:00Added an answer on June 9, 2026 at 3:04 pm

    When the DHTML runtime was created, the OpenLaszlo team decided to hide the implementation details of the HTML div structure from the developer using LZX. While it’s not recommended to directly access the underlying object structure of views, there are situations where you have to do it – but it might break your application with future updates of the platform.

    Take the following simple example application:

    <canvas debug="false">
    
      <view name="v1" x="10" y="10" width="100" height="100" bgcolor="red">
      </view>
    
    </canvas>
    

    If you compile the application using the query string

    lzoptions=proxied(true)%2Cruntime(dhtml)&target=html

    you will just get the application without the developer console. Now, when you inspect the page structure, you will see the following div structure:

    <body>
      <div id="appcontainer" style="height: 100%; width: 100%; margin: 0px; padding: 0px; border: 0px none; overflow: hidden; text-align: left; ">
        <div class="lzappoverflow" style="width: 1905px; height: 429px; ">
          <div class="lzcanvascontextdiv" id="lzcanvascontextdiv">
            ...
          </div>
          <div class="lzcanvasdiv">
            <!-- visual part of view instance with id="v1" -->
            <div class="lzdiv" style="background-color: rgb(255, 0, 0); height: 100px; width: 100px; left: 10px; top: 10px; z-index: 2; "></div>
          </div>
        </div>
      </div>
    </body>
    

    I’ve removed the CSS information and added the comment to mark the div representing the view with id=v1. You don’t see any div with the id value ‘v1’, since the view instances are instantiated as JavaScript objects storing a reference to the visual presentation. You can access the div by calling

    v1.getDisplayObject()

    which will return

    <div class=​"lzdiv" style=​"background-color:​ rgb(255, 0, 0)​;​ height:​ 100px;​ width:​ 100px;​ left:​ 10px;​ top:​ 10px;​ z-index:​ 2;​ ">​</div>​
    

    The object hierarchy of a view is *view->sprite->__LZdiv* property. That means, for each view OpenLaszlo instantiates a runtime specific sprite object, which in turn generates the corresponding div for the DHTML runtime.

    v1.sprite.__LZdiv.style.backgroundColor
    “rgb(255, 0, 0)”

    Here are the links to the implementations of the LzView and LzSprite class, if you are interested to learn about the internals:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any Public WebService API that I can query and get the search
Is there a public or private API that would let application get the surface
There are many java standard and 3rd party libraries that in their public API,
There is a non public api that I need to override in order to
Is there a service out there that provides public API for compressing CSS or
Is there any service that provide a public API to perform mathematical calculations (such
I'm using the spreadsheet JSON api on a public read-only document. Is there a
There is a public dropbox document that is updated every day or so. I
I like to know is there any specific reason that there is no public
Is there a public API from some big company to get my public ip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.