This question is locked. New answers and comments are not allowed.
I'm building a quick expense claim app as a POC for my company. I have a page with the model bound to an expense claim. I need to have a popup window to allow the user to add new expense items. I've done this as follows:
1. On the Expense claim form I have a hidden window with an empty div
2. When the user clicks the 'Add Item' button I get the 'AddExpenseItem' partial view, replace the empty div in the window with this partial view and then show the window.
This works great, except when I open the window a second time the controls don't work - clicking dropdowns doesn't open them and the date picker doesn't open etc.
I should also add that the AddExpenseItem view is bound to an expense item. When it wasn't bound to the model (i.e. just an ajax form) it worked fine.
Any help would be hugely appreciated, thanks!
1. On the Expense claim form I have a hidden window with an empty div
2. When the user clicks the 'Add Item' button I get the 'AddExpenseItem' partial view, replace the empty div in the window with this partial view and then show the window.
This works great, except when I open the window a second time the controls don't work - clicking dropdowns doesn't open them and the date picker doesn't open etc.
I should also add that the AddExpenseItem view is bound to an expense item. When it wasn't bound to the model (i.e. just an ajax form) it worked fine.
Any help would be hugely appreciated, thanks!