Home Search Member List Faq Register Login  
UltimateSpellMVC
Re: On Demand Initialization

Thread Starter: digvijoymohapatra12@gmail.com   Started: 09-05-2012 12:39 PM   Replies: 5
 Karamasoft Support Forums » General Discussions » UltimateSpellMVC » Re: On Demand Initialization
 Printable Version    « Previous Thread   Next Thread »
  05 Sep 2012, 12:39 PM
digvijoymohapatra12@gmail.com is not online. Last active: 1/23/2013 4:44:09 PM digvijoymohapatra12@gmail.com

Top 10 Posts
Joined on 08-23-2012
Posts 9
On Demand Initialization
All the controls on my page are added after the window load is fired and for some controls they are rendered on demand from client side.Also at times some of the controls are removed and again added.

It seems like the ultimate spell for spellasyoutype initializes at the window load. but this wount work for me, Is there a way that I can initialize spell for spellasyoutype on demand?

  
  05 Sep 2012, 12:56 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: On Demand Initialization
You should use the _OnLoad function template to do your initialization as demonstrated in client-side API samples. Please refer to http://www.karamasoft.com/UltimateSpell/ClientAPI.htm.
  
  05 Sep 2012, 3:38 PM
digvijoymohapatra12@gmail.com is not online. Last active: 1/23/2013 4:44:09 PM digvijoymohapatra12@gmail.com

Top 10 Posts
Joined on 08-23-2012
Posts 9
Re: On Demand Initialization
We have implemented progressive rendering wherein different sections keep on rendering after the page is loaded.

Also some controls are added dynamically when required.

In this case how do I add spellasyoutype functionality for those textboxes, I need a client side method to initialize the newly added element to the dom.

  
  05 Sep 2012, 3:46 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: On Demand Initialization

Without knowing what exactly your code looks like, it is hard to answer your question. You can either reply with your code and explain what exactly you are trying to achieve or look at our client-side API samples and documentation to see if you can achieve what you are looking for by using teh provided client-side API methods.


  
  22 Oct 2012, 10:53 AM
digvijoymohapatra12@gmail.com is not online. Last active: 1/23/2013 4:44:09 PM digvijoymohapatra12@gmail.com

Top 10 Posts
Joined on 08-23-2012
Posts 9
Re: On Demand Initialization
Hi
Please find the code below, where I am adding the input dig2 after the page loads.
@using (Html.BeginForm("About", "Home", FormMethod.Post, new { id = "form1" }))
{

    <table cellpadding="10">
    <tr valign="top" style="font-size:8pt;font-family:Verdana">
        <td>
            <table>
                <tr valign="top" style="font-size:8pt;font-family:Verdana">
                    <td>
                    <div id="AddControls">
                    <input id="dig1" name="dig1" type="text" contenteditable="true" value="But tehre was " maxlength="20" />
                    </div>
                   
                   
                        @Html.TextArea("TextArea1", "But tehre was was no great luxury about the furnishng of these rooms eithar. The furniture was of mohogany, covered with leather, in the old-fashionned style of 1820 the floor was not even stained, but evreything was shining with cleanlyness, and there were many chioce flowers in the windows; the most sumptuous thing in the room at the moment was, of course, the beatifuly decorated table.", new { @rows = "7", @cols = "60" })
                    </td>
                </tr>
                <tr valign="top" style="font-size:8pt;font-family:Verdana">
                    <td align="right">
                   
                     @(Html.UltimateSpellMVC()
                              .ID("UltimateSpellMVC1")
                              .ControlIdsToCheck("TextArea1,dig1")
                              .AutoCorrect(true)
                              .ShowSpellButton(true)
                              .ShowAddButton(true)
                              .CustomDictionary("TestKarmaSoft")
                              .SpellWaitPeriod(200)
                              .SpellAsYouType(true)
                              .Render())
                  

                                        </td>
                </tr>
            </table>
        </td>
        <td>
           
        </td>
    </tr>
</table>
  
 }

 <script type="text/javascript" language="javascript">
     $(document).ready(function (e) {
         debugger;
         $('#AddControls').append('<input id="dig2" name="dig2" type="text" contenteditable="true" value="go to hr"  maxlength="20" />');

     });
     </script>

How do I add spellasyoutype functionality for this control?

  
  22 Oct 2012, 11:02 AM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: On Demand Initialization
<script type="text/javascript" language="javascript">
     $(document).ready(function (e) {
         debugger;
         $('#AddControls').append('<input id="dig2" name="dig2" type="text" contenteditable="true" value="go to hr"  maxlength="20" />');
         UltimateSpells['UltimateSpellMVC1'].SetControlIdsToCheck('TextArea1,dig1,dig2');
     });
</script>

  
 Page 1 of 1 (6 items)
Karamasoft Support Forums » General Discussions » UltimateSpellMVC » Re: On Demand Initialization

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-2018 Karamasoft LLC. All rights reserved.