• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying alert message after submit in textbox

 
rrn rose
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

in my website , i have a form for sending emails...
everything is working fine, except one..

in the form there is two fields, one for entering name and other for email id..

my problem is tat , even after filling both the text fields and then click ' submit', it is showing alert to enter name and email...

please help me to solve it..

below shown is the code i have used..



please help me to solve this.....

 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't undertand what

ss[i].checked in function checkname(ss) is supposed to do?
ss.checked in function checkemail(ss) is supposed to do?
 
rrn rose
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please help me to find a code for validation of fields in text box???

ie i have a form in which there is two textfields for entering name and email.. when i click ' submit' it is gone to my email..

when anyone clicks 'submit' whenever a field is blank , it should display an alert message..

hope you understood .......

Thanks......
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rrn rrn " welcome to Javaranch
please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Establish a submit handler on the form in which you can validate the fields. Return false in order to prevent the form from submitting is you find problems.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Establish a submit handler on the form in which you can validate the fields. Return false in order to prevent the form from submitting is you find problems.


There is already a submit handler in the code - onsubmit="return validate();" which does return false (agree its in bad shape) when the validation fails. Or does a submit handler mean something else?
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam Mercs wrote:I don't undertand what

ss[i].checked in function checkname(ss) is supposed to do?
ss.checked in function checkemail(ss) is supposed to do?


Yes certainly they are not related to textbox property.

rrn,
simple check would do
 
rrn rose
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you to all who helped me to solve this..
now its working...

really appreciate all of your willingness to help me...

thank you...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rrn rose", please check your private messages for an important administrative matter. Yet again.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic