By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 1,895 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

dialogarguments error when using ShowModalDialogWithPost()

P: 4
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 = ShowModalDialogWithPost(url, args, features);

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

var wDestDataIsland =dialogArguments.document.getElementById("fund_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...
Oct 23 '08 #1
Share this Question
Share on Google+
2 Replies


P: 4
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.

Expand|Select|Wrap|Line Numbers
  1. function addNewClientContact()
  2. {
  3.     //alert("In Open Search");
  4.     var arr = new Array();
  5.     var dealId = document.getElementById("dealId").value        
  6.     var investmentPeId = document.getElementById("investmentPeId").value;
  7.     var hpFundSysId = document.getElementById("hpFundSysId").value;        
  8.     var fund_xml_id = document.getElementById("xmlFundData"); 
  9.  
  10.     var url = appRoot + "/addInvestmentFund.do?&dealId="+dealId+"&investmentPeId="+investmentPeId+"&hpFundId="+hpFundSysId;
  11.     var w = 900;
  12.     var h = 725;
  13.     var winArgs = new Array(fund_xml_id);
  14.     winArgs.title = 'Add Contact to Client'
  15.     alert("url = " + url);
  16.     var features= "help:no; status:no; scroll:no; resizable:yes; unadorned; no;dialogWidth:"+w+"px; dialogHeight:"+h+"px;"
  17.     winArgs = ShowModalDialogWithPost(url, winArgs, features);
  18.     if(winArgs == null)
  19.     {
  20.         window.alert("no data returned!");
  21.     }
  22.     else
  23.     {
  24.         document.getElementById("dealId").value = winArgs[0];
  25.         document.getElementById("investmentPeId").value = winArgs[1];
  26.         document.getElementById("hpFundSysId").value =  winArgs[2];
  27.         document.getElementById("xmlFundData").value =  winArgs[3];
  28.  
  29.         document.forms["investmentActionForm"].action = appRoot + "/createUpdatePendingTransaction.do?hpFundId="+winArgs[3];
  30.         document.forms["investmentActionForm"].submit();    
  31.     }
  32.  
  33. }

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

Expand|Select|Wrap|Line Numbers
  1. function updateParentXMLNode() {
  2.  
  3.     var wDestDataIsland =dialogArguments.document.getElementById("fund_xml_id");
  4.     //var xml = wDestDataIsland[0];
  5.     //alert("xml="+xml);
  6.     alert("hi..dialogArguments........"+dialogArguments.document.getElementById("fund_xml_id"));
  7.     //alert("hi..dialogArguments........"+dialogArguments.document);
  8.     //alert("hi..dialogArguments........"+dialogArguments.document.getElementById("fund_xml_id"));
  9.  
  10.     //alert("hi..........");
  11.  
  12.     var hpFundId = document.getElementById("hpFundId");
  13.     var basicOfAccounting = document.getElementById("basicOfAccounting");
  14.  
  15.     var wDestRecordSet = wDestDataIsland.recordset;
  16.     //var destRecCount = wDestRecordSet.recordcount;
  17.     //wDestRecordSet.moveLast();
  18.     wDestRecordSet.addNew();
  19.     //wDestRecordSet('investmentPeId')= document.getElementById("investmentPeId").value;
  20.     wDestRecordSet('hpFundId')= hpFundId.options[hpFundId.selectedIndex].value;
  21.     //alert("hi..........");
  22.     wDestRecordSet('fundName')= hpFundId.options[hpFundId.selectedIndex].text;
  23.     //alert("hi..........");
  24.     wDestRecordSet('commitment')= document.getElementById("commitment").value;
  25.     //alert("hi..........");
  26.     wDestRecordSet('vintageYear')= document.getElementById("vintageYear").value;
  27.     //alert("hi..........");
  28.  
  29.     wDestRecordSet('basicOfAccounting')= basicOfAccounting.options[basicOfAccounting.selectedIndex].value;
  30.     //alert("hi..........");
  31.     wDestRecordSet('basicOfAccountingDesc')= basicOfAccounting.options[basicOfAccounting.selectedIndex].text;
  32.  
  33.     //alert("hi..........");
  34.     wDestRecordSet('investmentAttribute1')= document.getElementById("investmentAttribute1").value;
  35.     //alert("hi..........");
  36.     wDestRecordSet('actionType')= document.getElementById("actionType").value;
  37.     //alert("hi..........");
  38.     wDestRecordSet('investmentAttribute2')= document.getElementById("investmentAttribute2").value;
  39.     //alert("hi..........");
  40.     wDestRecordSet('investmentAttribute3')= document.getElementById("investmentAttribute3").value;
  41.     //alert("hi..........");
  42.     wDestRecordSet('currency')= document.getElementById("currency").value;
  43.     //alert("hi..........");
  44.     wDestRecordSet('webSiteDetails')= document.getElementById("webSiteDetails").value;
  45.     //alert("hi..........");
  46.  }    
here i am getting error is dialogArgument is null..

any body help please...

Thanks,
Tirish
Oct 23 '08 #2

acoder
Expert Mod 15k+
P: 16,027
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.
Oct 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.