Populate a window with HTML


How do I populate a window with generated HTML Code?

I would like to populate a window with data (AJAX) when the user selects a row in a grid.
I tried populating a

with the data and using attachObject(‘divid’); but it only works once.
The next time I try using attachObject… the
object does not exist.
I know I am doing something wrong. Any direction would be helpful.

Thank You.



you may use attachURL(url,true) to load content via Ajax:
dhtmlx.com/docs/products/dht … _ajax.html

The next time I try using attachObject… the

object does not exist.

When you click “X” (close button), window and its content are removed.

To solve the problem you may hide window when the close button is clicked:

return false

In this case you will need to call win.show() to show the window again (there is no need to create the window after closing it).

Thank You.

I have been using the ‘detachObject’ to remove the

from the window, before closing the window, and then re-attaching the object to a new window.

This seems to work… but I think there should be a ‘cleaner’ way.

I will continue to investigate.

Thanks again.

In attachURL(url,true) what is the second argument for?

If second param set to true data will retrieved from server using ajax get call otherwise by creating iframe and setting iframe.src = url (first param)