Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

How do I use <input type="image" onclick="rapidSpell.dialog_spellCheck()" ? - RapidSpell Web ASP.NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
Geordon
#1 Posted : Wednesday, June 8, 2016 8:02:28 PM
Rank: Newbie

Groups: Registered

Joined: 6/8/2016
Posts: 3
Location: Mason, MI
I am using RapidSpell Web .NET v5 CLR .NETv4 in a VS2013 asp.net web site project using VB. I loaded the Keyoti_RapidSpell_Web_VB.NET_Demo solution, replaced all references from NETv2 to NETv4, and set the target framework to 4.5.2. After making the minor tweaks to use and include the .svc file, the demo successfully compiles and runs.

On the default.aspx page, there is a text box with two buttons below it. The first uses the classic popup dialog box. The second button uses the newer jQuery dialog box, which looks like this (at its bare minimum).
<input type="button" onclick="rapidSpell.dialog_spellCheck(true, 'TextBox1')"/>

Since all of our applications designed with RapidSpell Web v3 use a nice graphical image to invoke the WebLauncher, we would like to retain the image, but replace the invocation with the jQuery dialog, but it won't work. To demonstrate the problem, I added the following control to the default.aspx page in the demo, though you can add it to any page:
<input type="image" onclick="rapidSpell.dialog_spellCheck(true, 'TextBox1')" src="Images/AbcCheck.gif"/>

I want to target a specific textbox, but it also fails without any parameters. The button input works fine, the image input fails.

Can you please advise how I should code the HTML to use an image to invoke the spell checker against a specific asp:textbox?

Thank you,

Geordon
Jim
#2 Posted : Wednesday, June 8, 2016 8:56:42 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Hi Geordon, it's not working because image buttons submit the form.

You could change to

<input type="image" onclick="rapidSpell.dialog_spellCheck(true, 'TextBox1'); return false;" src="Images/AbcCheck.gif"/>

or use a link

<a href="#stayhere" onclick="rapidSpell.dialog_spellCheck(true, 'TextBox1');"><img src="Images/AbcCheck.gif"/></a>

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


Geordon
#3 Posted : Wednesday, June 8, 2016 9:19:22 PM
Rank: Newbie

Groups: Registered

Joined: 6/8/2016
Posts: 3
Location: Mason, MI
Jim,

Thanks for such a quick response. I used the modified input image and it worked like a charm. I did create an alternative, though it is kind of clunky:

<input type="button" onclick="rapidSpell.dialog_spellCheck(true, 'TextBox1')" style="width: 16px; height: 16px; border: none; background: url(Images/AbcCheck.gif) no-repeat"/>

Geordon
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.