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