We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Retrieve and Change Dialog Elements on Javascript

Thread ID:

Created:

Updated:

Platform:

Replies:

117298 Sep 25,2014 02:11 AM UTC Oct 2,2014 02:26 PM UTC ASP.NET Web Forms 5
loading
Tags: Dialog
Chong Yee Mei
Asked On September 25, 2014 02:11 AM UTC

Hi,

Would like to know how do I access the dialog elements, such as content, title and etc via Javascript for changing.

We have tried the following, as seems like the model data has changed, but not reflected on the dialog box.

var dialogObj = $("#EditorDialog").data("ejDialog");
dialogObj.model.title = result.d.Name;

dialogObj.open();

Kalpana Kandasamy [Syncfusion]
Replied On September 29, 2014 07:06 AM UTC

Hi Chong,

 Thank you for using Syncfusion Products.

We can access the title of Dialog using “title” property. For adding new content, we can empty the content of Dialog and new content can be placed using “contentUrl”.  Then we can get the replaced tile and content of Dialog control as shown as below,

[JavaSript]

<code>

<script type="text/javascript">

    var dialog;

    $(function () {

        // declaration

 

        dialog = $("#basicDialog").data('ejDialog');

    });

 

    function oncreate() {

        dialog.option("title", "Audi");

        $('#basicDialog').html("");

        dialog.option("contentUrl", "text.html");

    }

 

    script>

code>

 

Note: “text.html” file is available in the project.

 We have prepared a sample based on this and you can find the sample under the following location:

Sample : Dialog Sample

Please let us know if you have further queries

Regards,

Kalpana K

 


Kalpana Kandasamy [Syncfusion]
Replied On September 29, 2014 07:17 AM UTC

 

Hi Chong,

 

Thank you for using Syncfusion Products.

We can access the title of Dialog using “title” property. For adding new content, we can empty the content of Dialog and new content can be placed using “contentUrl”.  Then we can get the replaced tile and content of Dialog control.

[JavaSript]

<code>

<script type="text/javascript">

    var dialog;

    $(function () {

        // declaration

 

        dialog = $("#basicDialog").data('ejDialog');

    });

 

    function oncreate() {

        dialog.option("title", "Audi");

        $('#basicDialog').html("");

        dialog.option("contentUrl", "text.html");

    }

 

    script>

code>

 

Note: “text.html” file is available in the project.

 

We have prepared a sample based on this and you can find the sample under the following location:

Sample : Dialog Sample

Please let us know if you have further queries

Regards,

Kalpana K

 

 

 


Chong Yee Mei
Replied On October 2, 2014 02:18 AM UTC

Hi,

We have tried using dialog.option("title", "titlehere");

But it still does not update to be displayed on screen, the dialog being shown still does not have the new title.

Chong Yee Mei
Replied On October 2, 2014 02:26 AM UTC

It's alright, we found the problem, it seems we must call the open AFTER the setting of property, not before.

Previously, not working:

dialogObj.open();
dialogObj.option("title", activeNodeData.Name);

Now working:

dialogObj.option("title", activeNodeData.Name);
dialogObj.open();

Ezhil S [Syncfusion]
Replied On October 2, 2014 02:26 PM UTC

Hi Chong,

Thanks for your update.

We are glad that your issue have been resolved.

Kindly get back to us if you have further queries.

Regards,
Ezhil S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;