Jump to content

skafy

uniGUI Subscriber
  • Posts

    216
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by skafy

  1. This will only work in IE.

    Correct. Since IE is default browser in our company this doesn't bother me.

     

    ajaxRequest(DestinationObject, 'UserDetailsEvent', ['UserName='+WinNetwork.UserName]);

    Where do I put this code?. Where set form variable?

    Thank you very much!

  2. Ok. This is solved.

     

    procedure TMain.UniFormCreate(Sender: TObject);
    begin
      UniSession.AddJS('var WinNetwork = new ActiveXObject("WScript.Network");');
      UniSession.AddJS('alert(WinNetwork.UserName);');

    end;

     

    This pops up domain name of currently logged in user. Now I wonder how to get this WinNetwork.Username in a variable in outside JS. Eny ideas?

  3. I've put next function in MainModule but no success:

     

    function TUniMainModule.GetCurrentUserName: string;
    const
      cnMaxUserNameLen = 254;
    var
      sUserName     : string;
      dwUserNameLen : DWORD;
    begin
      dwUserNameLen := cnMaxUserNameLen-1;
      SetLength( sUserName, cnMaxUserNameLen );
      GetUserName(PChar( sUserName ),
        dwUserNameLen );
      SetLength( sUserName, dwUserNameLen );
      SetLength(sUserName, sUserName.Length - 1);
      Result := UpperCase(sUserName);
    end;

  4. What about DBColumnSort. It seems it does not work. I set Sortable value to True in column prop but still no effect. When I click column to stort only arrow works (showing asc/desc arrow).

  5. Hello,

     

    Can somebody help me with inserting pdf document from disc to uniHTMLFrame.

    I've got following code, but its not working.

     

    <div id="pdf">
     <object width="400" height="500" type="application/pdf" data="3.pdf" id="pdf_content">
      <p>Cant find document.</p>
     </object>
    </div>
     

×
×
  • Create New...