FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Freetextbox and atlas updatepanel

Last post 06-06-2008, 8:40 PM by gab211. 33 replies.
Page 2 of 3 (34 items)   < Previous 1 2 3 Next >
Sort Posts: Previous Next
  •  10-25-2006, 11:18 AM 7457 in reply to 7445

    Re: Freetextbox and atlas updatepanel

    That is one way to do and Im sure alot of people would appreciate that workaround. However, FTB still cant reside on the same page as an update panel, and Im pretty sure most people dont want the popup behaviour.

    No offence to your workaround, the base problem here lies with FTB.
  •  10-25-2006, 2:39 PM 7459 in reply to 7457

    Re: Freetextbox and atlas updatepanel

    I agree with you 100%, I look at this as a temporary solution to a problem that I would hope that FTB would be able to fix.  This solution is one that will allow me to use this component with asp.net ajax at tims time.

    Later!

  •  10-31-2006, 9:49 AM 7484 in reply to 7457

    Re: Freetextbox and atlas updatepanel

    I don't know if you have downloaded the new ASP.Net AJAX Beta 1.  FreeTextBox works with the update panel on the same page now!

    Edited:
    Well it almost works correctly.  If you put FreeTextBox into a UpdatePanel, it doesn't crash but it does downgrade itself when the AJAX postback is triggered.  I'm doing this to set a selected template into a FTB upon a dropdown selection.

  •  11-19-2006, 2:26 PM 7602 in reply to 7445

    Re: Freetextbox and atlas updatepanel

    Thanks for the sample tickko. Made it easy. The only problem I seem to have with your sample is if you change the colour to green or something.... It places a "#" into the selected querystring param. This means that the page address looks something like this.....

    http://localhost.... ?formname=’whatever’&selected=’blah<FONT color=#006600>sjhdf<FONT/><FONT color=#000000><FONT/>

    Which means that it only picks up the text etc up to the first # value in the selected querystring param the bit in grey is ignored as asp.net thinks that the address is completed at the #. Does anyone have any suggestions??

    Cheers
    Graeme

  •  11-19-2006, 7:27 PM 7603 in reply to 7602

    Re: Freetextbox and atlas updatepanel

    I found a way of stopping this error from occurring. You need to use the javascript function escape and unescape. This will stop the # trying to be the end of the address.

    so the following function I would change slightly.....

    function OpenFreeTextBox(frm, idname, postBack)

    {

    popUp = window.open('../Modules/PopupFTB.aspx?formname=' + frm.name +

    '&id=' + idname + '&selected=' + escape(frm.elements[idname].value) + '&postBack=' + postBack,

    'popupcal', 'width=600,height=575,left=150,top=40');

    }

    function SetFreeTextBox(formName, id, newHtml, postBack) // Function for freetextbox 'Pages/FTB/PopupFTB.aspx'

    {

    eval('var theform = document.' + formName + ';');

    popUp.close();

    theform.elements[id].value = unescape(newHtml);

    if (postBack)

    __doPostBack(id,'');

    }

    This will mean that colours should work too.

    Cheers
    Graeme

  •  11-19-2006, 11:43 PM 7604 in reply to 7603

    Re: Freetextbox and atlas updatepanel

    I just got the Freetextbox to work with the Atlas UpdatePanel perfectly.

    First of all I'm using the Beta 2 version of Atlas (now ASP Ajax I guess), so I don't know if it will work the same with Beta 1.

    Anyway, all I did was place the following code to turn off the security validation.  For some reason that seems to cause the 500 unknown error when you place the FreeTextBox inside the UpdatePanel.

    ValidateRequest

    ="False"
  •  11-21-2006, 1:03 PM 7615 in reply to 7604

    Re: Freetextbox and atlas updatepanel

    I just tested and it is working strange.

    I did following:
    - inside <ContentTemplate> i placed label, 2 buttons and FreeTextBox
    - For OnClick event I assigned code :
            Label1.Text = FreeTextBox1.Text;
            FreeTextBox1.Text = "Test <b>text</b> ";
    - Run

    Result is following:
    - click button (label == empty, FreeTextBox == empty)
    - click button (label == empty, FreeTextBox == Test text)
    - click button (label == Test text, FreeTextBox == empty)

    And so on.

    Please advise.   
  •  11-21-2006, 9:17 PM 7622 in reply to 7615

    Re: Freetextbox and atlas updatepanel

    You need to use the .ViewStateText to retrieve text out of freetextbox.

    Try Label1.Text = FreeTextBox1.ViewStateText

    Cheers
    Graeme

  •  11-22-2006, 6:23 AM 7624 in reply to 7622

    Re: Freetextbox and atlas updatepanel

    ACIT:

    You need to use the .ViewStateText to retrieve text out of freetextbox.

    Try Label1.Text = FreeTextBox1.ViewStateText

    Cheers
    Graeme



    Thanks,

    But I also have problem with FreeTextBox1.Text = "Test <b>text</b> ";

    I can't use FreeTextBox1.ViewStateText because it is readonly.

    Alexander
  •  11-22-2006, 11:53 AM 7625 in reply to 7615

    Re: Freetextbox and atlas updatepanel

    The FTB editor works in ASP.Net AJAX Beta 1 & 2 but when FTB is placed within a updatepanel it downgrades itself when an ajax postback is triggered.  The toolbars and textbox become locked/readonly.

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
         <ContentTemplate>
              <asp:TextBox ID="TextBox1" runat="server" Width="300px"></asp:TextBox>
              <asp:Button ID="btnLoad" runat="server" OnClick="btnLoad_Click" Text="Load" />
              <FTB:FreeTextBox ID="ftbMessage" runat="server">
              </FTB:FreeTextBox>
         </ContentTemplate>
    </asp:UpdatePanel>

    Protected Sub btnLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs)
         ftbMessage.Text = TextBox1.Text
    End Sub

    It seems to me that there isn't much support with FTB for AJAX at this time.

  •  12-06-2006, 9:30 AM 7693 in reply to 7625

    Re: Freetextbox and atlas updatepanel

    thank for all if any body solve this problem

    please can tell me how

  •  05-31-2007, 11:21 AM 8265 in reply to 6194

    Re: Freetextbox and atlas updatepanel

    I have the same problem with AJAX Update Panel and FTB. So far no support anywhere.

  •  08-17-2007, 2:53 AM 8468 in reply to 8265

    Re: Freetextbox and Ajax updatepanel

    I have found out a solution for 'freetextbox' problem with Asp.Net  Microsoft Ajax UpdatePanel.
    Pls try the following code inside the form tag.

    <script type="text/javascript">
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_pageLoaded(Initialize_FTB);
    function Initialize_FTB(sender, args)
    {
    FTB_InitializeAll();
    }
    </script>

    Just copy the code to your page below the UpdatePanel.

    Happy coding.
    kmkirankumar@gmail.com
  •  08-27-2007, 3:21 AM 8496 in reply to 7625

    Re: Freetextbox and atlas updatepanel

    I am Narendra,

                     I am also faced same problem. Plz help me anybody.

                      Update Panel is not supported FreeTextBox.

  •  01-25-2008, 2:53 PM 8857 in reply to 8468

    Re: Freetextbox and Ajax updatepanel

    I get an object not found error on the FTB_InitializeAll(); call
Page 2 of 3 (34 items)   < Previous 1 2 3 Next >
View as RSS news feed in XML
www.freetextbox.com