Welcome Guest Search | Active Topics | Sign In | Register

Dialog Control Options
Raine Lightner
Posted: Wednesday, July 11, 2007 11:26:35 AM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
So, I'm trying to implement the dialog control in a page and I've got a couple of questions:

1. How does one set the content of the dialog before it is shown?

2. when passing anything other then eo_GetObject('dlg').show(true);
I get an error in the ashx file that says "dialog is not defined" Thoughts?

Thanks

-Raine
eo_support
Posted: Wednesday, July 11, 2007 11:34:37 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,093
Hi Raine,

Please refer this page as for how to set content of the dialog:

http://essentialobjects.com/ViewDoc.aspx?t=Dialog%2fDialog_UI.html

As for your second question, I am not sure what you mean by "passing anything other then eo_GetObject('dlg').show(true);", "passing" from where to where? But either case you should check the ID that you pass to eo_GetObject, in your case "dlg", is the ID of your dialog control.

Thanks
Raine Lightner
Posted: Wednesday, July 11, 2007 11:44:58 AM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
So.. the first part was:
eo_GetObject('dlg').show(true);

if I put eo_GetObject('dlg').show(true, 'here is my title', 'some data'); it gives me an error.

Second part:

ContentHtml doesn't appear to be part of the client side script area?

This does not set the content area:

var d = eo_GetObject('dlg');
d.contentHtml = 'Howdy!';
d.show(true);

eo_support
Posted: Wednesday, July 11, 2007 1:27:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,093
Hi Raine,

I have confirmed that the first issue is a bug. We will fix it as soon as possible.

Dialog ContentHtml does not exist on the client side yet. Hopefully we will be able to add it along with our next update.

Thanks
Raine Lightner
Posted: Wednesday, July 11, 2007 2:39:10 PM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
Thanks.

I'm really surprised it wasn't on the initial release.
-Raine
eo_support
Posted: Wednesday, July 11, 2007 2:50:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,093
It was not there because ContentHtml is outputted as is --- such as 'Howdy!', it does not have a DHTML element boundary. We could add an element around it but part of the purpose of this property is allow you to have full control over it so nesting another layer around it partially defeats the purpose. As you know, it's impossible to update a segment on the client side without a boundary DHTML element. For this reason, we are still not sure whether we should have it in our future release.

A simple workaround is to add the boundary element by yourself. For example, you can do:

Code: C#
Dialog1.ContentHtml = "<span id=\"dialog_content\"></span>";


Then do this on the client side:

Code: JavaScript
var span = document.getElementById("dialog_content");
span.innerHTML = 'Howdy!';


Thanks
Raine Lightner
Posted: Wednesday, July 11, 2007 3:53:10 PM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
That works I suppose.. I have to set the value after the show is called though. :(


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.