Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Issues with Add Button - RapidSpell Web ASP.NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
TechyGypo
#1 Posted : Thursday, May 12, 2016 12:23:48 PM
Rank: Member

Groups: Registered

Joined: 12/19/2014
Posts: 4
I am having issues or maybe that I just don't understand, but I have situations where I do and I don't want the Add button to be shown. In both instances, I do want the user to be able to use the user dictionary in the suggestions.

My parameter settings for when I do want to be able to add are as such:

Quote:
rapidSpell.setParameterValue('default', 'IgnoreXML', true);
rapidSpell.setParameterValue('default', 'IncludeUserDictionaryInSuggestions', true);
rapidSpell.setParameterValue('default', 'DictFile', '\\my_path\\DICT-EN-UK-UKEnglish.dict');
rapidSpell.setParameterValue('default', 'UserDictionaryFile', '\\my_path\\userdict.txt');


My parameter settings for when I do not want to be able to add are as such:

Quote:
rapidSpell.setParameterValue('default', 'IgnoreXML', true);
rapidSpell.setParameterValue('default', 'IncludeUserDictionaryInSuggestions', true);
rapidSpell.setParameterValue('default', 'DictFile', '\\my_path\\DICT-EN-UK-UKEnglish.dict');


I have removed the UserDictionaryFile parameter. In both cases the Add button shows.

Also, if there is no reference to the user dictionary file, how can I include the user dictionary in the suggestions?

Thanks :)
Jim
#2 Posted : Thursday, May 12, 2016 6:53:32 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
When you don't specify UserDictionaryFile it defaults to ~/user-dictionary.txt, so that's why the button still shows. You should set UserDictionaryFile in both cases, but you can hide the Add button through customization:

https://keyoti.com/produ...idSpellWeb%20Layout.htm

I don't know if you're using the jQuery dialog or not. If you are, then it should be straightforward to hide the add button using Javascript. With the jQuery dialog the dialog code is actually on the page doing the spell checking - whereas with the ASPX page mode, the dialog code is in a separate window.

If you are not using the jQuery dialog (there is an ASPX page with the popup that loads in a different window), you'll need to follow the first section of that link above. The question will be though, how do you tell the popup that you don't want the Add button visible. You need some form of communication between the main page and the popup. Possibly adding your own GET parameter to the popup URL might work

rapidSpell.dialog_popupURL='path_to_file.aspx?showAdd=false';

and then in your popup ASPX you can read 'showAdd' in Javascript and hide the Add button with CSS.

Otherwise, you could use a cookie to communicate with the popup, set the cookie in JS just before launching the spell checker, and the ASPX page's JS read the cookie and hide the Add button.

That's a lot to take in so let me know if I can help further,

Jim
-your feedback is helpful to other users, thank you!


TechyGypo
#3 Posted : Friday, May 13, 2016 3:31:10 PM
Rank: Member

Groups: Registered

Joined: 12/19/2014
Posts: 4
Thanks Jim. All makes sense thank you :)

I created a custom pop-up based on the default and add a querystring param as you suggested. All looking good now!
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.