Developer forum

Forum » Development » Dw Editor PostBack

Dw Editor PostBack


Reply

Hi There fellow developers,

 

Has anyone successfully grab the text from the Dw Editor on at ascx page on postback.

To problem is when using .net controls like Calendar it makes a postback. And all values in Dw Controls are gone.

 

Is there a hidden way to postback dw values or a my only option to make a session value?


Replies

 
Reply
lak@dkis.dk wrote:

Hi There fellow developers,

 

Has anyone successfully grab the text from the Dw Editor on at ascx page on postback.

To problem is when using .net controls like Calendar it makes a postback. And all values in Dw Controls are gone.

 

Is there a hidden way to postback dw values or a my only option to make a session value?

 

I found a solution to the problem:

 

I min Aspx or Ascx file

 

   <script language="javascript">
function FCKeditor_OnComplete(editorInstance)
{
editorInstance.Events.AttachEvent('OnAfterLinkedFieldUpdate',escapeValue)
}
function escapeValue(editorInstance)
{
editorInstance.LinkedField.value = escape(editorInstance.LinkedField.value);
}
</script>

 

In my code behind file

 

In my button_click code blog

 

    tbBeskrivelse.LoadPostData("tbBeskrivelse", HttpContext.Current.Request.Form);

    tbBeskrivelse.Text = HttpUtility.UrlDecode(tbBeskrivelse.Text);

 

Where tbBeskrivelse is my Editor Id

 

 
Reply

I have the same problem with postbacks and the editor and tried to get it work with your code.

Would you (or someone else) care to elaborate this a bit.

I render my editor with :

Dynamicweb.Gui.Editor("txEditor", "");

I have added the javascript above to my ascx file. Should I make any changes to it?

I have also added the code behind to what raises the postback.

Is "txEditor" my editor id?

I am a bit confused and would appriciate if someone could enlighten me.


 

 
Reply

There have been issues with dw controls and postback, but this is fixed in the next release.

 

You must be logged in to post in the forum