This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes JS text in html page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JS text in html page" Watch "JS text in html page" New topic
Author

JS text in html page

akhter wahab
Ranch Hand

Joined: Mar 02, 2009
Posts: 151

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


Start Earning Online||Start Earning Using Java
subhash kumar
Ranch Hand

Joined: Jul 14, 2010
Posts: 63
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:



Subhash Kumar
Attitude is everything
akhter wahab
Ranch Hand

Joined: Mar 02, 2009
Posts: 151

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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jul 14, 2010
Posts: 63
you can try like this


and delete row once again go for the validation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JS text in html page
 
Similar Threads
Jquery form validation
Check if an email-adress is valid with javascript
RememberMe on login page
Ajax code getting null value