redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers

Ask your IT question here

how to change the name attribute of a p



 
Post new topic   Reply to topic    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
PaulKolin
Enthusiastic Coder


Joined: 25 May 2006
Posts: 108
If i have a external JS file, and i need to change the name attribute of a <.p> , can u just getElementById from the document... and then do element.name = "" to change its name ?

Reply with quote
 
AmeliaR
Enthusiastic Coder


Joined: 31 May 2006
Posts: 142
PaulKolin, Paragraphs can't have name attributes, and they serve little purpose.
If you need a unique identifier, use an id. They you can use gEBI. If you need a grouping identifier, use one or more classes.

Reply with quote
 
PaulKolin
Enthusiastic Coder


Joined: 25 May 2006
Posts: 108
Yes, i need a group identifier
Reply with quote
 
AmeliaR
Enthusiastic Coder


Joined: 31 May 2006
Posts: 142
`js class # and this aids in maintaining multiple classes
Reply with quote
 
Lusis Backwood JR
Enthusiastic Coder


Joined: 26 May 2006
Posts: 87
Location: United States
Js class: http://phrogz.net/JS/AddClassKillClass_js.txt
Reply with quote
 
PaulKolin
Enthusiastic Coder


Joined: 25 May 2006
Posts: 108
Thanks
Reply with quote
 
Page 1 of 1
Post new topic   Reply to topic    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group