using InsertDocument.js to show custom data from list

Last post 04-01-2010, 4:02 PM by Adam. 2 replies.
Sort Posts: Previous Next
  •  03-31-2010, 12:48 PM 59779

    using InsertDocument.js to show custom data from list

    Basically I have extra textboxes to use when uploading documents to set the keywords for that uploaded file.  
     
    My question is when I select the downloaded file (left side of the insert document dialog) I see that the url dynamically changes and I would like it so my keywords change depending on which one is selected.   (something like this in short textbox.text = select keywords from tablename where fileID = @fileId)
     
    I figured I would find the code that changes the url in insertDocument.js but the format is very hard to read, anyone know where I could do this? Even have it so that as a list item is select an alert box pops up, I could do the rest fine.\
     
    Thanks 
  •  04-01-2010, 4:02 PM 59816 in reply to 59779

    Re: using InsertDocument.js to show custom data from list

    You need to open/edit Dialog_InsertDocument.js file.
     
    The following is the default function.
     
    1. function row_click(row)  
    2. {  
    3.     var isdir;  
    4.     if(Browser_IsOpera())  
    5.     {  
    6.         isdir=row.getAttribute("isdir")=="true";  
    7.     }  
    8.     else  
    9.     {  
    10.         isdir=row.isdir;  
    11.     }  
    12.           
    13.     if(isdir)  
    14.     {  
    15.         //if is check box  
    16.         if(Event_GetSrcElement().nodeName=='INPUT')return;  
    17.       
    18.         hiddenAction.value="changedir";  
    19.         hiddenActionData.value=row.getAttribute("path");  
    20.         window.PostBackAction();  
    21.     }  
    22.     else//Preview  
    23.     {  
    24.         var path=row.getAttribute("path");  
    25.         hiddenFile.value=path;  
    26.         var url=row.getAttribute("url");  
    27.         Window_GetElement(window,"TargetUrl",true).value=url;  
    28.           
    29.         var htmlcode = row.getAttribute("htmlcode");  
    30.         if(htmlcode!=""&&htmlcode!=null)  
    31.         {  
    32.             do_preview(htmlcode);  
    33.         }  
    34.         else  
    35.         {  
    36.             try{  
    37.                 Actualsize();  
    38.             }  
    39.             catch(x)  
    40.             {  
    41.                 do_preview();  
    42.             }  
    43.         }  
    44.     }  

     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-01-2010, 4:02 PM 59817 in reply to 59779

    Re: using InsertDocument.js to show custom data from list

    You need to open/edit Dialog_InsertDocument.js file.
     
    The following is the default function.
     
    1. function row_click(row)  
    2. {  
    3.     var isdir;  
    4.     if(Browser_IsOpera())  
    5.     {  
    6.         isdir=row.getAttribute("isdir")=="true";  
    7.     }  
    8.     else  
    9.     {  
    10.         isdir=row.isdir;  
    11.     }  
    12.           
    13.     if(isdir)  
    14.     {  
    15.         //if is check box  
    16.         if(Event_GetSrcElement().nodeName=='INPUT')return;  
    17.       
    18.         hiddenAction.value="changedir";  
    19.         hiddenActionData.value=row.getAttribute("path");  
    20.         window.PostBackAction();  
    21.     }  
    22.     else//Preview  
    23.     {  
    24.         var path=row.getAttribute("path");  
    25.         hiddenFile.value=path;  
    26.         var url=row.getAttribute("url");  
    27.         Window_GetElement(window,"TargetUrl",true).value=url;  
    28.           
    29.         var htmlcode = row.getAttribute("htmlcode");  
    30.         if(htmlcode!=""&&htmlcode!=null)  
    31.         {  
    32.             do_preview(htmlcode);  
    33.         }  
    34.         else  
    35.         {  
    36.             try{  
    37.                 Actualsize();  
    38.             }  
    39.             catch(x)  
    40.             {  
    41.                 do_preview();  
    42.             }  
    43.         }  
    44.     }  

     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML