Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL Tridion 2009 SP1 Custom URL get current field value

I am connecting to a Custom URL on a component field which contans the following code

        function SaveAndClose()
        {
            var newValue = new Array();
            newValue[0] = "/feed.ashx?type="+ $("#Type").val() + "&user="+ $("#User").val();
            window.returnValue = newValue;
            self.close();
        }
       document.write("Current Value:");
       document.write(window.dialogArguments.fieldValue);

The SaveAndClose Function works perfect and sends the value back to the component, but window.dialogArguments.fieldValue always returns undefined.

like image 486
Mark Richardson Avatar asked Oct 06 '22 07:10

Mark Richardson


1 Answers

You need to read the customArguments property on the dialogArguments:

document.write(window.dialogArguments.customArguments.fieldValue);
like image 68
Peter Kjaer Avatar answered Oct 10 '22 01:10

Peter Kjaer