Home Search Member List Faq Register Login  
UltimateEditor
Re: Unable to reference UltimateEditors variable when UltimateEditor is within a FormView control

Thread Starter: art   Started: 08-23-2006 4:46 PM   Replies: 2
 Karamasoft Support Forums » General Discussions » UltimateEditor » Re: Unable to reference UltimateEditors variable when UltimateEditor is within a FormView control
 Printable Version    « Previous Thread   Next Thread »
  23 Aug 2006, 4:46 PM
art is not online. Last active: 5/15/2012 4:13:41 PM art

Top 10 Posts
Joined on 08-19-2006
Posts 41
Unable to reference UltimateEditors variable when UltimateEditor is within a FormView control
I created a standard form with an UltimateEditor control on it (the ID of the control is UltimateEditor1) and was able to reference the control in Javascript using UltimateEditors['UltimateEditor1']. I am most impressed with this product as it does almost everything I need.

I then enhanced the form to use the FormView control as it is much less coding. The UltimateEditor control is embedded in the <EditItemTemplate> part of the formview and is active in 'edit' mode and works fine.
 
The problem is when I now try to reference UltimateEditors['UltimateEditor1'] in Javascript I get an error message of:

Error: 'UltimateEditors.UltimateEditor1' is null or not an object

I need to make this javascript reference because I need to insert some html into the UltimateEditor control when the user clicks on a button on the form, similar to the example code provided with the package.

How can I reference the UltimateEditor control with Javascript when the control sits within a FormView control?

Another problem I have is that once I put the UltimateEditor control in a formview, it's postback event handler is no longer recognised and casues a compile error message of:

Handles clause requires a WithEvents variable defined in the containing type or one of its base types


  
  23 Aug 2006, 5:34 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Unable to reference UltimateEditors variable when UltimateEditor is within a FormView control
If you place UltimateEditor inside a FormView, the client-id of the editor control will no longer be UltimateEditor1. You should get the client-id using ClientID property of UltimateEditor on the server-side and then use it instead of UltimateEditor1.
  
  23 Aug 2006, 8:31 PM
art is not online. Last active: 5/15/2012 4:13:41 PM art

Top 10 Posts
Joined on 08-19-2006
Posts 41
Re: Unable to reference UltimateEditors variable when UltimateEditor is within a FormView control
Thank you for the advice, by determining the ClientID on the Load event of the form I have successfully implemented the javascript call to inserHtml into the editor control.


  
 Page 1 of 1 (3 items)
Karamasoft Support Forums » General Discussions » UltimateEditor » Re: Unable to reference UltimateEditors variable when UltimateEditor is within a FormView control

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2021 Karamasoft LLC. All rights reserved.