File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes span tag issue in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "span tag issue in javascript" Watch "span tag issue in javascript" New topic
Author

span tag issue in javascript

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hello,

Below is my code :

If I write instead of
then as soon as I fill in "message" field , I get Alert "Hi" which is right , but after that all other fields(e.g. zip, phone) get vanished.

Is this how <span> tag should be written ?

Please advise.


This is the code :-



Thanks,
Pramod
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Span elements do not have an empty tag notation, so it should be <span></span>


On a side note: you should be using label elements



Eric
pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Thanks Eric for your advice.

I'll look for more details on label elements.

Thanks for improvement.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: span tag issue in javascript