Knowledge Base


Keyoti KB Knowledgebase Home Page  >  RapidSpell Web .NET  >  Behavior Customization

Search the Knowledge Base Browse by Category
Setting the textbox to check in Javascript (RapidSpellWebLauncher)
http://keyoti.com/kb/Default.aspx?ToDo=view&questId=192&catId=55

Options

Print this page
Email this to a friend
Post a comment

By implementing a custom interface you have the flexibility to decide which textbox is checked, using Javascript. This example implements the interface and uses two buttons to switch which textbox is to be checked, and then launch the checker.

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JSTextBoxSwitch.aspx.cs" Inherits="JSTextBoxSwitch" %>

<%@ Register TagPrefix="rapidspellweb" Namespace="Keyoti.RapidSpell" Assembly="Keyoti.RapidSpellWeb.ASP.NETv2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

<script>

var tbToCheck;

function RSCustomInterface(tbElementName){

this.tbName = tbElementName;

this.getText = getText;

this.setText = setText;

function getText(){

//return the text from the text component named

return tbToCheck.value;

}

function setText(text){

//set the text in the text component to the text argument

tbToCheck.value=text;

}

}

</script>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:TextBox id="tb1" runat="server" />

<asp:TextBox id="tb2" runat="server" />

<rapidspellweb:RapidSpellWebLauncher runat="server" RapidSpellWebPage="PopUp.aspx"

TextComponentInterface="Custom"

id="RapidSpellWebLauncher1"

ShowButton="false"

/>

<input type="button" value="tb1" onclick="tbToCheck=document.getElementById('tb1');<%=

RapidSpellWebLauncher1.ClientSideObject %>.OnSpellButtonClicked(); " />

<input type="button" value="tb1" onclick="tbToCheck=document.getElementById('tb2');<%=

RapidSpellWebLauncher1.ClientSideObject %>.OnSpellButtonClicked(); " />

</div>

</form>

</body>

</html>

 

 

 


Visitor Comments:

No visitor comments posted. Post your comments.
 
Related Questions:

Attachments:

No attachments were found.



About | Contact | Site Map | Privacy Policy

Copyright © 2002-2010 Keyoti Inc.