Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JS text in html page

 
akhter wahab
Ranch Hand
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys here is my code i want that if user give wrong email address format java script prints the warning in the HTML page not in the j option pane please guide me i m new in java script
 
subhash kumar
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
first thing script tag always comes in the head tag(<head></head>) or body tag (<body></body>)

you can easily validate email by regular expression as follows:


 
akhter wahab
Ranch Hand
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is not my problem dear i knew how to validate an email address ..... but my problem is i don't want to show warning in alert but i want to show the warning in the Html page like text ..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So open a new window, but yuck: why not just show it on the page they're already on? Much better user experience, and it's one less popup I have to close.
 
subhash kumar
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try like this


and delete row once again go for the validation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic