I'm looking for a script or direction to help to find a script (maybe java?) that will validate an email based on comparing it to another email text field. So when one enters an email and then "confirm email. The two entries must match. This form is .asp. This should be client side validation and not through my server.
Need some help with comparing a date field retrieved from an access date base to the current date. Basically I'm looking to create and if statement like:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them to select today.
example: var dtToday = Date() if(document.frmSoftware.txtDDate.value == dtToday) { alert("You cannot select same day distributions. Please enter a new value in the "Delivery Date" field."); return false }
But dtToday seems to be blank....How can I get dtToday value? Also, when I set the dtToday value outside javascript and used a Response.Write to see what format Date() came up with - it gave me 1/24/2005 - but the calendar pop-up gives me 01/24/2005....could this also be the issue?
I have a page that adds data to an Access DB. When an employee adds a record I want to compare the phone number from the data they inputted to all of the phone numbers that are currently in the database for that field.
If the new phone number currently matches any record in the DB I want to have an alert that notifies the employee that a record with that phone number exists with the date that the first record was inputted and ask whether they want to continue and add the the new record or cancel the addition of the new record. Otherwise, I want the data to just be added. At this point I have a Case statement that will add the record after a submit button click.
Can anyone point me to a tutorial or example code of how to write VBScript (or VB6) code that could look at two versions of a document and mark all differences between the two?
I am working on a project for a newspaper. the goal is to be able to store each version of an article from rough draft to final copy, and look at any two versions in the process and see what changes were made.
We have a shared hosting plan (Windows-based) with GoDaddy.com. GD.com has a "generic" form mailer script (gdform.asp) that allows us to set up a "Contact Us" page, which, when the user clicks "Submit" sends an email to us.
I am a complete newbie re asp, but looking at the code, it looks to me as if a error is generated if any of the fields are left blank--which is good. I don't want to be getting emails that don't contain messages, or that don't contain a return email address.
However, submitting a completely blank form results in me getting an email with blank response fields.
Can you take a look at this code and tell me if it should be allowing blank fields to be submitted? Are there any changes that can be made? Code:
I would like to make two field in a for required fields. Do you all know a simple way to accomplish this? I can post form and any asp if needed( page is getting really huge).
I have a form field on an ASP page and was wondering if I can require the number that is entered to begin with a 0 or a 2.If the number starts with anything else,the user is notified to update the number correctly(Your [FormField] must begin with a 0 or a 2, Please update your entry).
so basicly if the user enters a 5, 4, 3, or 2 digit number the input will be forced to it's maxlength. I need this because I am writing to an SQL db and am combining multiple form inputs into one field in the db table ie(variable = A&B&C&D)
On a different webpage I need to display the variables. I am doing this by string manipulation functions like the one below.
how to validate a DATE field i have written my own javscript method but it's not considering all apects so is there any readymade method to check date.
I have a problem. Of course, or I wouldn't be posting here. Ok, now that Mr. Obvious is out of the way ...
I'm looking for some ideas. Take a look at the code below. I'm looking for the most efficient way to validate form field input on the server-side. I'll provide what I have. What I'm looking for are improvements.
'The next line is supposed to be an RFC 2822 address compliant validation expression 'objRegExp.Pattern= "^(?:[w!#$\%&'*+-/=?^`{|}~]+.)*[w!#$\%&'*+-/=?^`{|}~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-](?!.)){0,61}[a-zA-Z0-9]?.)+[a-zA-Z0-9](?:[a-zA-Z0-9-](?!$)){0,61}[a-zA-Z0-9]?)|(?:[(?:(?:[01]?d{1,2}|2[0-4]d|25[0-5]).){3}(?:[01]?d{1,2}|2[0-4]d|25[0-5])]))$
if not (Validate_Input(str_Customer_Email,"EMAIL_ADDRESS")) then response.write ("error") if not (Validate_Input(str_Customer_Phone,"US_PHONE")) then response.write ("error") if not (Validate_Input(str_Customer_Name,"NAME")) then response.write ("error") if not (Validate_Input(str_Customer_Zip,"ZIP")) then response.write ("error")
response.end %>
Now, I'll obviously want to do more than write "error" to the screen with the validated input. What I *really* want ideas on is a more efficient way to validate the fields. In this small example doing them as one-offs isn't bad. On a form that has 20-30 fields it becomes cumbersome.
I need a text box to only take 6 digits. It should work like this:
If the user inserts say '89' form would actually send over '000089'. Likewise if they inserted 1234, again the form would send 001234, if they inserted 1 it would send 000001 and so on..
Yes, the easy way round this would be to give the users a message to input the data as 001234 for example, but is there any way this can be done dynamically?
I have a form that has both static and dynamic fields. I have no problem validating the static data, but whenever I try and apply form validation to a dynamic text box that has repeated rows, the validation does not seem to take. Do I have to run that validation through a loop? Code:
I'm using ASP 3.0,IIS and Java script.I have created some text boxes Dynamically using java script.So the text boxes has got the same name. This is the code i'm using for that..
Problem is that when i'm doing client side validation using javascript its not taking values..Here 2 or 3 or 4 text boxes with the course will be created when i use this code:
at one page it works fine and when i use the same kind of code to update another TEXT field it doesn't update and the I.E. loading bar increases very slowly and the next page never loads someone suggested to use .appendchunk i used rs.appendchunk and i got the error "object doesn't support this property or method" he also said that .appendchunk cannot be used to update nvarchar.
i removed the code to update TEXT field and the page loaded as expected (normally)! Why one text field worked fine while the other didn't?
i have a table in which i have many text boxes, they are named as a1,a2,a3,a4 to a16 the next row is b1,b2,b3 to b16 and so on up to G1,G2 etc, where the user enters his data, what i want to do is only allow the user to enter numbers, which can have decimals if required,
how can this be done, also i have another set of textboxes through which i want to loop and prevent user the user from entering the same data in more then one box how can this be done any help will be appreciated thank you.these are the text boxes a1,b1,c1,d1,e1 etc which is actually the first column in the table.
I am trying to write some code that inserts or updates a text field in my SQL Server 2000 database. The SQL statement is created using a submit from a form, and the text is coming from a <textarea>, and therefore being placed into the SQL statement via a Request("field"). However, due to limitations in SQL Server 2000 and text fields, I can not use a simple Update or Insert command with text over 8000 bytes.
Does anybody have any sample statements that will help me update that field with larger amounts of data? I have tried using the WRITETEXT function and UPDATETEXT function with little or no success.
i have a form that has two hidden fields.The first hidden field will has a value like this 'EM12HILL.JPG'.The second hidden field has a value like this 'AA01'.What i would like to happen is when submit button is pressed, the characters in the first hidden field will change to the following 'AA01HILL.JPG', as they are passed to another form.
Is it possible to recall a variable with the combination of text + rs.field? i want to recall the variable "speler1", at the place weher rs("speler") is 1. It's probably again easy.
I been searching google but I can't find how to shorten a text field and if it has been shortened to place a space and triple dot (...) after it. So if the text field was 75 characters long it would shorten it to 50 and add " ...". Is it also possible to shorten it to 50 to the nearest word? This is what I got so far: Code:
... <td> <p> <% = left(rs("my_text").value,50) & IF rs("my_text").count > 50 Then Response.Write(" ...") End If %> </p> </td> ...
In a form I have one pulldown menu, and one text field. Both MUST get their values from an Access database they connect to. Without submitting the form, how do I change the value appearing in the text field by changing the selection in the pulldown menu? Remember both the text field and the pulldown menu MUST get their values from a database.
I need a user to follow a format. For example entering a date. I need the user to enter a date in this format MM/DD/YY. How do I check to see if they followed that format?
I need the user to enter a currency amount without the "$" sign. How do I check to see if the Request.Form("price") value has a "$" sign in it? I guess I need to know how to parse a string in ASP.