In a DhmtlxTabbar Content page, I would like to pop up a window and attached to the page which contain the DhmtlxTabbar controlls. But an Exception is reported and failed.
Would you like give me some help or suggestion?
Thank you very much.
My example code is as follows:
/In B.aspx**/
this.dhxWins = new dhtmlXWindows();
this.dhxWins.setSkin(“dhx_blue”);
this.dhxWins.attachEvent(“onContentLoaded”, function(win) {win.progressOff();});
this.dhxWins.enableAutoViewport(false);
//an exception is threw when running this line. I plan to let A.aspx as viewport
this.dhxWins.setViewport(10, 10, 900, 800,parent.document);
var ProductSelectWindow = this.dhxWins.createWindow(“ProductSelectWindow”, 250, 50,720, 530);
If I init dhtmlxWindows with default viewport directly from attached page, The windows will be localized in the attached page and are not displayed in the center of the screen, which will bring bad experience to users.
Actually, as a compromise, now I init windows on document.body for main page.
But the Application Logic is now changed as follows: the main page pop up a window, the window call a function of the main window by parent object, then the main window forward the call to the tab content page, which finally get the data from poped window to update the tab content page.
Therefore, I feel it is a bit ugly in encapslation.
Because the main page is our basic framework, there are nine tabs and need to pop up many windows. I think that encapsulating creation of these windows and their processing in the tab content window would be a good choice, which is independent of the main page of framework.
Could you please provide two completed demos with tabbar and windows for case of your first post (that is not working as you want) and for you last post (with document.body init). I will check how it works (by second demo) and probably will suggest how to implement it for your first demo.
That is very kind of you.
But Please wait for two days because I am busy in my project.
After two days, I will pack up the two demo and upload to you.
Thanks!
I especially provide the two demo with the attachment.
One is what I hoped but It failed, the other is now adopted solution but it is beyond my expected disign.
I would like you give me a better solution or some advice.
Personally I think that initing window and receiving the returned data should be placed in the content page because the clicked button which lead to pop the window is in the content page.
But at the same time, in order to let the window center on the page, it looks necessary to set parent documnet as viewport.
Thanks!
I run mainpage.htm in IE7. The exception still exists, if I delete the comment in ContentPage.htm to call setViewport.
Please note that: Uncomment the code in ContentPage.htm,
/********************************************************
Attention:
Exception from the two line codes,which are used to set the MainPage as viewport to let the pop window display on the center of screen.
dhxWins.enableAutoViewport(false);
dhxWins.setViewport(10, 10, 1000, 1000, parent.document);
*******************************************************/
The wrong message is :" htmlfile: invalid parameter" in function setviewport
I try to upload the new error demo and record of the demo on our side in IE7
But the forum tell me:
Sorry, the board attachment quota has been reached.
may I have other methods to give you the error demo and its record ?