ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to clone a new Lookup?
Title:
B
I
{code}
?
I have a Lookup int the page,like: @Html.Awe().Lookup("name").Value(0) now, I must clone this lookup to the page. Like: $('[name="name"]').clone(true); Yeah,it's cloned. But the cloned lookup have not any events.Like chose the options. And the event all trigger to the old lookup. How to change it?
Save Changes
Cancel
xiaojunjor
asked at 09 Sep 2019
Answers
B
I
{code}
?
you cloned the html part, but there's also javascript that was executed against that html; the easiest way would be to have the lookup in a cshtml view get it's html (which contains js as well) via ajax, after use jquery `.append()` or `.html()` to set it where you need it. but if you want client only solution, you could look at the string (html/js) generated by the html helper and copy the js code in your code.
Save Changes
Cancel
Omu
answered at 09 Sep 2019
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