Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2009, 04:35 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Question igtxt:WebTextEdit to execute a Javascript function

Hi, I need help please.

I have a javascript function within a xslt file.

On my dev tool, I have a WebTextEdit box with the properties & events.
on the KeyPress event i want to add the javascript function IsNumeric().

var edit = igedit_getById("FG2100RefNo"); IsNumeric(edit);

but i get the the error: can't eval.

Please Assist, Regards!
 
Old January 7th, 2009, 08:16 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Question

Hi, I need to execute an entire javascript function.

This works: var edit = igedit_getById("FG2100RefNo");var editText = edit.getText();alert(!isNaN(editText));
But this only checks & displays a message box.

I need to execute the below javascript:
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;

return true;
}
//-->
</SCRIPT>
onkeypress="return isNumberKey(event)"

How do i do this with the webtextedit:

var edit = igedit_getById("FG2100RefNo");var editText = edit.getText(); function isNumberKey(evt){var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false;return true;} return isNumberKey(editText)

I only have the onkey event property value to insert the code!

Please Assist





Similar Threads
Thread Thread Starter Forum Replies Last Post
Onmouseover attrib for element igtxt:WebTextEdit ismailc XSLT 3 October 17th, 2008 03:45 AM
WebTextEdit ClientSideEvent Javascript-Can't Eval ismailc ASP.NET 2.0 Basics 4 October 14th, 2008 05:14 AM
execute function whoses name is stored in a variab aliawan Beginning VB 6 5 February 4th, 2005 05:01 AM
public function execute = HELP! Return value ? davidkwang VS.NET 2002/2003 0 April 28th, 2004 12:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.