In SP 2010 the variable “_spPageContextInfo” should already be present in the page, and adding the SP2007 code example to the page would not work (and might interfere with other features)
Does the list have the default forms, or has it been modified in SharePoint Designer? Do you see any errors in the dev console (hit F12 > Console)?
Try typing this in the dev console and hitting enter:
_spPageContextInfo
How does the output look like?
Alexander