open attachment in new form but delte in _self
Hello,
I've adapted the attachments control with the following Java script:
Which works fine for displaying an attachment in a new browser window but it also sets the delete link to target _blank which blocks the delete function - is there a way to only adapt the link of the attachment to be opened in a new window(_blank) and leave the delete link as it originally is?
best regards
Christian
I've adapted the attachments control with the following Java script:
Code: Select all
fd.field('Attachments').control()._el().find('a').removeProp('onclick').prop('target','_blank');
best regards
Christian
Hello keusch,
You can try out this code:
You can try out this code:
Code: Select all
var attachmentsLink = fd.field('Attachments').control()._el().find('a');
for (var i = 0; i < attachmentsLink.length; i++) {
if(i % 2 === 0){
$(attachmentsLink[i]).removeProp('onclick').prop('target','_blank');
}
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 14 guests