dialogarguments error when using ShowModalDialogWithPost()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thirish
    New Member
    • Oct 2008
    • 4

    dialogarguments error when using ShowModalDialogWithPost()

    hi,

    when i click from parent jsp page i am opening a pop with some value. for this i am useing below method. Useing this method i am able to open the popup.
    retObj = ShowModalDialog WithPost(url, args, features);

    in pop up i need to get xml useing dialog Arguments.

    var wDestDataIsland =dialogArgument s.document.getE lementById("fun d_xml_id");

    when i use above line in java script i am getting error as dialogArguments is nulll or not an object.

    Please help me in this as soon as possiable...
  • thirish
    New Member
    • Oct 2008
    • 4

    #2
    dialogArgument error

    Hi,

    i have requriment is in parent page when i click a add button i have to display popup screen with some values. In popup i have create button. when i click a create button i need to add the popup value in xml and that xml need to display in parent page with out page submission. for i am useing xml islands.

    here i am getting error is dislogArguments is null or not an object.

    i am posting code..The below code when i click add button in parent page. i am calling for popup.

    Code:
    function addNewClientContact()
    {
    	//alert("In Open Search");
    	var arr = new Array();
    	var dealId = document.getElementById("dealId").value		
    	var investmentPeId = document.getElementById("investmentPeId").value;
    	var hpFundSysId = document.getElementById("hpFundSysId").value;		
    	var fund_xml_id = document.getElementById("xmlFundData"); 
    	
    	var url = appRoot + "/addInvestmentFund.do?&dealId="+dealId+"&investmentPeId="+investmentPeId+"&hpFundId="+hpFundSysId;
    	var w = 900;
    	var h = 725;
    	var winArgs = new Array(fund_xml_id);
    	winArgs.title = 'Add Contact to Client'
    	alert("url = " + url);
    	var features= "help:no; status:no; scroll:no; resizable:yes; unadorned; no;dialogWidth:"+w+"px; dialogHeight:"+h+"px;"
    	winArgs = ShowModalDialogWithPost(url, winArgs, features);
    	if(winArgs == null)
    	{
    		window.alert("no data returned!");
    	}
    	else
    	{
    		document.getElementById("dealId").value = winArgs[0];
    		document.getElementById("investmentPeId").value = winArgs[1];
    		document.getElementById("hpFundSysId").value =  winArgs[2];
    		document.getElementById("xmlFundData").value =  winArgs[3];
    		
    		document.forms["investmentActionForm"].action = appRoot + "/createUpdatePendingTransaction.do?hpFundId="+winArgs[3];
    		document.forms["investmentActionForm"].submit();	
    	}
    	
    }

    when i click create button in popup i am using this code

    Code:
    function updateParentXMLNode() {
    
    	var wDestDataIsland =dialogArguments.document.getElementById("fund_xml_id");
    	//var xml = wDestDataIsland[0];
    	//alert("xml="+xml);
    	alert("hi..dialogArguments........"+dialogArguments.document.getElementById("fund_xml_id"));
    	//alert("hi..dialogArguments........"+dialogArguments.document);
    	//alert("hi..dialogArguments........"+dialogArguments.document.getElementById("fund_xml_id"));
    	
    	//alert("hi..........");
    	
    	var hpFundId = document.getElementById("hpFundId");
    	var basicOfAccounting = document.getElementById("basicOfAccounting");
    
    	var wDestRecordSet = wDestDataIsland.recordset;
    	//var destRecCount = wDestRecordSet.recordcount;
    	//wDestRecordSet.moveLast();
    	wDestRecordSet.addNew();
    	//wDestRecordSet('investmentPeId')= document.getElementById("investmentPeId").value;
    	wDestRecordSet('hpFundId')= hpFundId.options[hpFundId.selectedIndex].value;
    	//alert("hi..........");
    	wDestRecordSet('fundName')= hpFundId.options[hpFundId.selectedIndex].text;
    	//alert("hi..........");
    	wDestRecordSet('commitment')= document.getElementById("commitment").value;
    	//alert("hi..........");
    	wDestRecordSet('vintageYear')= document.getElementById("vintageYear").value;
    	//alert("hi..........");
    	
    	wDestRecordSet('basicOfAccounting')= basicOfAccounting.options[basicOfAccounting.selectedIndex].value;
    	//alert("hi..........");
    	wDestRecordSet('basicOfAccountingDesc')= basicOfAccounting.options[basicOfAccounting.selectedIndex].text;
    	
    	//alert("hi..........");
    	wDestRecordSet('investmentAttribute1')= document.getElementById("investmentAttribute1").value;
    	//alert("hi..........");
    	wDestRecordSet('actionType')= document.getElementById("actionType").value;
    	//alert("hi..........");
    	wDestRecordSet('investmentAttribute2')= document.getElementById("investmentAttribute2").value;
    	//alert("hi..........");
    	wDestRecordSet('investmentAttribute3')= document.getElementById("investmentAttribute3").value;
    	//alert("hi..........");
    	wDestRecordSet('currency')= document.getElementById("currency").value;
    	//alert("hi..........");
    	wDestRecordSet('webSiteDetails')= document.getElementById("webSiteDetails").value;
    	//alert("hi..........");
     }
    here i am getting error is dialogArgument is null..

    any body help please...

    Thanks,
    Tirish
    Last edited by acoder; Oct 23 '08, 09:16 PM. Reason: Added [code] tags

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Threads merged. Please do not double post your questions.

      Please also use [code] tags when posting code. See How to Ask a Question. Thanks.

      Moderator.

      Comment

      Working...