permaculture playing cards
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
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: 323

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: 15385
    
    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: 323

Thanks Eric for your advice.

I'll look for more details on label elements.

Thanks for improvement.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: span tag issue in javascript
 
jQuery in Action, 3rd edition