Is it possible to create a new object using a string?
For example, how can I convert the string "product" to var p = new Product
?
Thanks in advance.
EDIT
What I want to do is to have a menu with <a href="#home"></a><a href="#products">products</a>
and create the corresponding object from the href each time.