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

python - Alternative to referencing variable before assignment -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -