Proper naming convention for html elements -


i name html elements prefix btn buttons, txt textbox, chk checkbox, rad radio buttons, etc.

however, 1 of colleague pointed out not proper way it. said should not use prefix, instead name saverecord submit button instead of btnsaverecord.

my point of doing can knew element defined on situation, example:

for php:

if (isset($_post["btnsaverecord"])) 

for coldfusion:

<cfif structkeyexists(form, "btnsaverecord")> 

is there common-majority practice on how name these elements?


Comments

Popular posts from this blog

unix - grep command not match start of new line with another regex -

sql - calculate weighted average for each day and id based on time intervals in PostgreSQL -

Sort a complex associative array in PHP -