ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
My second lookup with CRUD actions doesn't work in the same form
Title:
B
I
{code}
?
Hi, I need your help again about how to have twoo lookups with CRUD (just create) functionality in it's Popup on a same form. On the form a done : @The create js function that i copy on the demo version of mvcawesomeproject@ <script type="text/javascript"> function create(o) { $('#Dinner-awepw').find('tbody').prepend(o.Content); } </script> I call the firt lookup to choose a user (a have the SearchForm and the controllers needed for that) and it works <div > @Html.Awe().Lookup("User").CustomSearch(true).TableLayout(true).HighlightChange(true).Title("Select a user") </div> I call the second lookup to choose a company (Here i have separate SearchForm and controllers too). <div class="editor-field"> @Html.Awe().LookupFor(model => model.Company).CustomSearch(true).TableLayout(true).HighlightChange(true) </div> Now, this second one doesn't work (No error but any interraction when clicing). But when a call it in a other form without this kind of lookup, it works. My question is, how can i have many lookups with CRUD functionnality in these popups on one form? Thank you for your help
Save Changes
Cancel
ousmane.nacanabo
asked at 22 Mar 2014
you're probably getting multiple html elements with same id, check the console see if you get any errors (F12 in chrome/ff); for instance if you would do @Html.Lookup("Foo") @Html.Lookup("Foo") one lookup won't work
at 22 Mar 2014
Omu
Yes may be multiple html elements with same id but i don't know where because when i cheik the console i got any error. I have @Html.Awe().Lookup("User").CustomSearch(true) and @Html.Awe().Lookup("Company").CustomSearch(true) I think the problem can be the js create function (i don't know how the helper works with it exactly). Must-i have a js create function for each Lookup or what can i do?
at 24 Mar 2014
ousmane.nacanabo
the js create function is used by the create PopupForm, in the custom SearchForm
at 24 Mar 2014
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK