473,386 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

JScript / ASP.NET question

Finally getting some thing to work but am perlpexed by
client side jScript code.

Two questions we'd really appreciate some feedback on:

1: If we have a function in JScript that validates a
user input, and the function detects bad data how to I
force the user back to the same field? If the data is
wrong we want to force the focus back to the same text
box. The current function is on the ONCHANGE event.

2: On an HTML textbox we have a pointer to the function
mentioned above. If you wanted to have a generic ZIP
CODE box, for example, how do you pass in some parameters
like the name of the textbox ojbect at runtime? In other
words would like to have a standard function to validate
zip codes , phone numbers etc and call this one function
for each type of data with the name of the calling
textbox and some text for error messgaes.

Thanks

Chuck
Nov 17 '05 #1
1 1280
"Chuck Traywick" <ct******@uslec.net> wrote in message
news:0e****************************@phx.gbl...
Finally getting some thing to work but am perlpexed by
client side jScript code.

Two questions we'd really appreciate some feedback on:

1: If we have a function in JScript that validates a
user input, and the function detects bad data how to I
force the user back to the same field? If the data is
wrong we want to force the focus back to the same text
box. The current function is on the ONCHANGE event.


You may find the following helpful:

ASP.NET Validation in Depth
(http://msdn.microsoft.com/library/de...-us/dnaspp/htm
l/aspplusvalid.asp).
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Christopher Brandsdal | last post by:
Hi! Maby this is wring newsgroup.. I'm using ASP / VBscript on my own cms system, but I needed to use some jscript to make something work... I'm new to jscript, so here is a simple question:...
10
by: Christopher Brandsdal | last post by:
I have this string: /sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how would I do this? In VBScript I could find the...
4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
14
by: John Bentley | last post by:
Note this is crossposted to comp.lang.javacript and microsoft.public.dotnet.scripting. After some Googling and FAQing my understanding of these terms is, crudely: Javascript (3 different...
10
by: SergioT | last post by:
Hi I wanna to create a jscript function that sets the value of a textbox into a datagrid, But the problem is How can I obtain the name of the textbox and send it to my jscript function???? The...
4
by: RFS666 | last post by:
Hello, I have the following problem: I have a web project where I display an activeX control that displays 2D-graphs on an aspx-page. I use jscript to access and modify the properties of the...
6
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that...
5
by: Maxwell2006 | last post by:
Hi, I have a requirement to develop an application component using only Server-Side Jscript (not Jscript.NET). What is Server-Side Jscript?
3
by: bowser | last post by:
Hello, I have a problem of communication between JScript and C#. I must say that I'm new to both. In a JS file I have to call a C# function. In particular I have: public function Eval(expr :...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.