I have a form that uses JavaScript to open another form when a specific field is clicked by the user. The new form should load based on the value of a specified dropdown field. I have used this before, but it was for a table filled with lookup rules, and the specified field in that case was a multi-line field which I targeted using 'text area'. I am targeting my dropdown field using 'selected' which seems right, but I can't get it to work. The new form opens, but displays "null" where it should display the asset name which would then populate the rest of the form based on the lookup rules. I'm sure it is a simple fix, but I can't figure it out. Any help would be appreciated!
01 | $(document).on( "onloadlookupfinished" , function (event) { |
02 | $( '.assetlink' ).click( function () { |
03 | t = $( this ).find( '.assetname selected' ).val(); |
09 | window.open(url, '_blank' ); |
12 | console.log( 'lookup complete' ); |
I do have other scripting activities going on, but this is the snippet related directly to opening the second form.