473,383 Members | 1,896 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,383 software developers and data experts.

wrong input pop-up message

underscore
hello all TSD supporter


i am using a PHP to develop my page... what i wanted to do in my mind is to have a pop-up message if the user input an invalid data like textbox or list menu in my page.

pls. show me a sample code...


thanks. TSD
Sep 17 '07 #1
5 2692
rpnew
188 100+
hello all TSD supporter


i am using a PHP to develop my page... what i wanted to do in my mind is to have a pop-up message if the user input an invalid data like textbox or list menu in my page.

pls. show me a sample code...


thanks. TSD

Hi,
I dont know whether you can do this with PHP or not but validation is very easy with small javascript.

RP
Sep 17 '07 #2
Hi,
I dont know whether you can do this with PHP or not but validation is very easy with small javascript.

RP
what i mean if the user has a wrong input in a certain text box in html form. what code in java script i write.

can you show me a sample code sir?
Sep 17 '07 #3
ak1dnar
1,584 Expert 1GB
what i mean if the user has a wrong input in a certain text box in html form. what code in java script i write.

can you show me a sample code sir?
How far you have completed on this? what you mean By "wrong inputs" ?
Its better if YOU can give us an example about your application.
Sep 17 '07 #4
How far you have completed on this? what you mean By "wrong inputs" ?
Its better if YOU can give us an example about your application.
[wrong inputs] i mean i have a textbox in html form which intended for date only but the user input a text. now what should i want if the user input a text when the user press the enter key thr will be an an error message displayed.
Sep 18 '07 #5
ak1dnar
1,584 Expert 1GB
[wrong inputs] i mean i have a textbox in html form which intended for date only but the user input a text. now what should i want if the user input a text when the user press the enter key thr will be an an error message displayed.
You can do it on both client side and server side. Ask the question in the javaScript forum to do it by client side.
If you need to do the same by server side just refer to do these links.
http://php.net/regex
http://php.net/checkdate
http://www.regular-expressions.info/php.html
Sep 18 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
5
by: DamonChong | last post by:
Hi, I am still struggling to master C++ and is trying to understand how to achieve passing arguments using pointers. I got some questions that I like to post to the experts here, hope you can...
29
by: Enrico `Trippo' Porreca | last post by:
Both K&R book and Steve Summit's tutorial define a getline() function correctly testing the return value of getchar() against EOF. I know that getchar() returns EOF or the character value cast to...
28
by: wwj | last post by:
void main() { char* p="Hello"; printf("%s",p); *p='w'; printf("%s",p); }
5
by: google | last post by:
first, a little background... i have a C program which preprocesses some data, and then outputs the results into a text file. that text file, in turn, is used as input to a FORTRAN...
6
by: Kobu | last post by:
Do the "larger" input functions like scanf, gets, fgets use fgetc to take input or an operating system call function like read() (I know it could be any "way", but I'm trying to find out how it's...
16
by: msundaram.visvanathan | last post by:
Hi, i tried to write this small code in C which would: Input :a b c d Output:abcd code: #include<stdio.h>
10
by: ¬a\\/b | last post by:
Careful thought library functions are important i think that for tame (domare) the input stream are useful function like these i use. i don't know if they are right Note: when ask input: is...
3
by: belton180 | last post by:
CODE]../* Program function: Simulate the stack using a stack limit of 10. Display a menu for the the following. Create a stack Insert an item in the stack Pop an item from the stack ...
2
by: perhapscwk | last post by:
My code below, I can add and remove textbox, however, it can add/remove the last one only. How I can add a input textbox between field? thanks. my html file <script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...

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.