.NET object inside DHTMLX Window

I’m sorry if this is a stupid question, however, I’m trying to augment my .net application with some of the functionality in DHTMLX . Can I embed a .NET aspx page inside your window? How easy is it to join DHTMLX stuff with .NET apps?

attachURL method places the page into the iframe. The latter is created automatically:

win.attachURL(“your.aspx”);

I’ve got that to work, however, I can’t seem to get the buttons to work on the window, I keep checking the pathing to the img folder but it doesn’t seem to help.

Any advice would be helpful.

BTW Alexandra thanks for your help with the window!! You’re great.

hi,

I’ve got that to work, however, I can’t seem to get the buttons to work on the window

please provide the complete demo if the problem isn’t solved

um I can’t provide the code for the entire app I’m building its very large the dhtmlx is a very small part. but here is some of the code, I dunno if it’ll help because I’m thinking it might be a file structure issue.

       String WindowRequestString = String.Empty;
        WindowRequestString = "Search.aspx?TorVName=";
        //WindowRequestString = "Search.aspx";
        WindowRequestString += ReportList.SelectedValue.ToString();
        //showNewWindow(WindowRequestString);
        string Script = "";
        Script += "<script language=JavaScript id='OpenWindow'>";
        Script += "var dhxWins= new dhtmlXWindows();";
        Script += "var url= '"+ WindowRequestString + "';";
        Script += "var id= 'OpenWindow';";
        //Script += "dhxWins.setImagePath('imgs/');";
        Script += "var win = dhxWins.createWindow(id, 10, 10, 600, 350);";
        Script += "var mywin= 'Keyon Report Parameters';";
        Script += "dhxWins.window(id).setText(mywin);";

        //Script += "dhxWins.window(id).button(id).show();";
        Script += "dhxWins.window(id).attachURL(url);";
        Script += "</script>";

hope you can read this, javascript wrapped in .net

Thanks Dean :stuck_out_tongue:

Hi,

the path to window buttons is set in the css file. For “dhx_skyblue” skin (default) the path to bottons image is set here:

.dhtmlx_skin_dhx_skyblue div.dhtmlx_wins_btns div.dhtmlx_wins_btns_button {
background-image:url(…/imgs/dhxwins_dhx_skyblue/buttons.gif);
}

You need include dhtmlxwindows_dhx_skyblue.css file

And place imgs folder (from dhxwindows package) according to the “…/imgs/dhxwins_dhx_skyblue/buttons.gif” path - “css” and “imgs” folder need being placed into the same folder

Thank you that worked wonderfully!!

Hi,

Do you know how I can close a window from an aspx “Cancel” button embedded within the window itself? I’m currently taking the angle of trying to run the javascript:

protected void CancelBtn_Click(object sender, EventArgs e)
{
string strOldName = String.Empty;
string Script = “”;
Script += “”;

    if (!Page.IsClientScriptBlockRegistered("CloseWindow"))

        Page.RegisterClientScriptBlock("CloseWindow", Script);

}

I’ve included the paths in the aspx:

<link rel="stylesheet" type="text/css" href="/css/dhtmlxwindows.css"/>

however, the javascript error keeps coming up:
dhtmlxWindows is not defined

even if it was defined I don’t know if I’m referencing the id of the window correctly. I’m having all kinds of problems trying to control the parent/child relationship when I open a new window and I’m trying to pass parameters back to the calling (parent) window, but I’m not sure how to do this.

Thanks Deano

Hi,

here is the sample in the package:

dhtmlxWindows/samples/01_init/12_inner_close.html

Well that example shows me how to create another window?
function doOnLoad() {
dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("…/…/codebase/imgs/");
dhxWins.enableAutoViewport(false);
dhxWins.attachViewportTo(“winVP”);
win = dhxWins.createWindow(“w1”, 20, 30, 320, 200);
win.setText(“dhtmlxWindow”);
win.attachURL("…/common/inner_close_url.html?etc=" + new Date().getTime());

what actually closes the window? I don’t understand…

Another problem I’m having with DHTMLX is that in order for me to send a querystring to the parent window, I need to add _top on the form to break out of the iframe. How can I call the parent window and send it a querystring without breaking the iframe?