ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
PopupForm Success firing before dialog opens
Title:
B
I
{code}
?
The RefreshClientDataPartialViews() function is being called when I click the link and before the dialog is open. Then, upon clicking my ok button, the function is not called. @(Html.Awe().PopupFormActionLink() .Name("CreateMasterClientRecord") .Url(Url.Action("Create", "MasterClientRecord")) .LinkText("Link project to a Master Client Record") .Parameter("Project_ID", Model.Project_ID) .Success(@String.Format("RefreshClientDataPartialViews({0})", Model.Project_ID))) Am I missing something here?
Save Changes
Cancel
rsnider19
asked at 11 Mar 2014
you need to remove the ({0}), it's supposed to be "success function name"
at 11 Mar 2014
Omu
Answers
B
I
{code}
?
So it looks like you can't pass parameters into the function as I was trying to do. Instead, have the Action return a Json object with what you need, and that gets passed to the function like so: [HttpPost] public ActionResult Create(Project_ViewVM input) { ... return Json(new { Project_ID = record.Project_ID}); } And then in your js function: function RefreshClientDataPartialViews(data) { RefreshClientData(data.Project_ID); RefreshMasterClientData(data.Project_ID); }
Save Changes
Cancel
rsnider19
answered at 11 Mar 2014
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