locked
doubts about winmode params RRS feed

  • Question

  • Hi,
    when i use winmode = 1 i can retrieve the arguments using:

    var sSelectedRows = window.dialogArguments;

    how can i retrieve the same arguments using winmode = 0

    can anybody help-me?

    tks
    Wednesday, November 28, 2007 7:14 PM

Answers

  • Unfortunately you can't do this with winmode = 0, as window.dialogArguments only works with dialogs (equivalent to winmode 1 and 2)

     

    Wednesday, November 28, 2007 8:40 PM
    Moderator
  • How about this. It will make a request to http://myserver/mypage.aspx once for each selected item, passing the id of that item

     

    var _a = window.dialogArguments;
    for(i=0; i<_a.length; i++)
    {
     var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     xmlhttp.Open("POST", "http://myserver/mypage.aspx?id=" + _aIdea, false);
     xmlhttp.Send();

     var resp = xmlhttp.responseXML;
    }

     

     

    Friday, November 30, 2007 11:34 AM
    Moderator

All replies

  • Unfortunately you can't do this with winmode = 0, as window.dialogArguments only works with dialogs (equivalent to winmode 1 and 2)

     

    Wednesday, November 28, 2007 8:40 PM
    Moderator
  •  

    Also aware that window.dialogArguments only works when the Url and CRM server are in the same domain.
    Thursday, November 29, 2007 9:33 AM
    Moderator
  • yeah, i know it... i'm look for a way when i can retrieve this arguments usisng other commands.
    there is a another way to retrieve thats arguments using winmode = 0?

    or a way to use a form in the windmode = 1, cause i've got some problems using then... when i clck in the submit button its open another window and i lost some of the arguments passed by
    window.dialogArguments
    Thursday, November 29, 2007 11:06 AM
  • I don't see why you shouldn't be able to use a modeless dialog with winmode = 1. What you have to do is make web requests using AJAX or equivalent, not use submit becasue that will reload the form and lose the dialog arguments. This issue has nothing to do with the winmode.

     

     

     

     

     

    Thursday, November 29, 2007 5:34 PM
    Moderator
  •  DavidJennaway wrote:

    I don't see why you shouldn't be able to use a modeless dialog with winmode = 1. What you have to do is make web requests using AJAX or equivalent, not use submit becasue that will reload the form and lose the dialog arguments. This issue has nothing to do with the winmode.

     
     



    have you any sample?
    Thursday, November 29, 2007 6:00 PM
  • How about this. It will make a request to http://myserver/mypage.aspx once for each selected item, passing the id of that item

     

    var _a = window.dialogArguments;
    for(i=0; i<_a.length; i++)
    {
     var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     xmlhttp.Open("POST", "http://myserver/mypage.aspx?id=" + _aIdea, false);
     xmlhttp.Send();

     var resp = xmlhttp.responseXML;
    }

     

     

    Friday, November 30, 2007 11:34 AM
    Moderator