Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test user entry and update accordingly

Status
Not open for further replies.

SkiCheif

Technical User
Sep 8, 2004
30
US
I need to test a users entry and then update the textbox they were in based on an extra input from them.

I think the easiest way for me to describe it is to write psuedo vba code (which i'm more comfortable with)

Background:
User is entering in results from a wrestling match. If the value is numeric, then the match was decided on points. However, if there the wrestler was pinned or won by a technical fall then I want to ask them for the time of the match and add that to the combo box selection they made.

Form Control Name: cboHomeMatchScore

(also, I am use to 'lost focus' instead of 'blur'
----------------------------------------------------
Dim strUserEntry as String
Dim strCurrent as String

strCurrent = cboHomeMatchScore

[cboHomeMatchScore.LostFocus Event]

If Not IsNumeric(cboHomeMatchScore) then

strUserEntry = InputBox("Please Enter the time in this format '00:00'")

cboHomeMatchScore = strCurrent & " " & strUserEntry

Else

'do nothing here

End If

------------------------------------------------------

Goal:
To test the users input to see if there are points scored or the event ended in a 'timed manner'

Concantenate the result if not numeric with the user entered time

FOR EXAMPLE

Win By Fall 01:30


I have been playing with this for about two weeks trying to figure it out on my own. I also had another problem that with the help of Tarwin I was able to overcome. Thanks For Your Help :)







 
you are mixing javascript events with ASP vbScript. You can't. ASP is executed server-side, before the page is sent to the client and javascript is executed client-side and as such has no effect on the server code.

what you need to do is set the fields using client-side code then submit. Check forum216 (javascript) FAQs



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top