› Forums › Classic DFFS › JS Open Form in Modal vLookup Issue
- This topic has 2 replies, 2 voices, and was last updated 6 years, 3 months ago by Alexander Bautz.
-
AuthorPosts
-
-
January 9, 2018 at 21:39 #19259KaseyParticipant
I have a list with DFFS with a vLookup. When I open the Disp/Edit forms normally in modal and add a child record via vLookup I have no issues. However, when I try to use javascript to open the Disp/Edit form in a modal when I create my child item I begin typing in the Title column. The first time I hit the space bar the parent record opens up in a new modal. I have tried both of the below methods to open my form. I’m assuming it has something to do with the pagetype in the URL as I’m using 4 and 6 instead of 5 and 7. Any ideas how to get around this issue?
This issue was not present in 4.4.2.9. It is happening with 4.4.3.31.
var URL = $j_site + ‘/_layouts/listform.aspx?PageType=4&ListId=’ + $j_restList + ‘&ID=’ + _finReqID;
var _function = “EditItem2(null,'” + URL + “‘)”;function openModalDialog(LinkURL,LinkTitle) {
options = SP.UI.$create_DialogOptions();
options.url = LinkURL;
options.title = LinkTitle;
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
SP.UI.ModalDialog.showModalDialog(options);
} -
January 9, 2018 at 21:52 #19263
-
January 10, 2018 at 00:05 #19266Alexander BautzKeymaster
This sounds strange. Try changing the function like this:
function openModalDialog(LinkURL,LinkTitle) { var options = { "url":LinkURL, "title":LinkTitle, "dialogReturnValueCallback":function(status){ if(status === 1){ // The dialog item was edited }else{ // The dialog item was canceled } } }; SP.UI.ModalDialog.showModalDialog(options); }
Any difference?
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.