i need some help here. I have a dialog box that contains an iFrame with my html file of a jqgrid. What i want to do is that when I double click a data from the jqrid inside that dialog box, the dialog box will automatically close and will post the id of the row that was click in the first dialog box.
Here's my javascript code:
EDIT:(Note: this code is from subAccount.js)
$( "#mainGrid" ).click(function() { //note: mainGrid is inside of another dialog box where i should post the row id
$( "#dialogMainAccount" ).dialog( "open" ); //this is the dialog box that contains my .html with jqgrid in it.
$( "#dialogMainAccount" ).append(
'<p>Please choose code to add in Sub Account Group.</p>'+
'<iframe src="mainAccountGroup.html" width="100%" height="800">' + // i use an iFrame to open my .html file
'<p>Your browser does not support iframes.</p>' +
'</iframe>');
});
Edit: This is my code for closing the dialog box inside the mainAccountGroup.js
$("#tblData1").jqGrid({
.//some code here
.
.
caption: "Main Account Group",
ondblClickRow: function(rowid) {
parent.$("#dialogMainAccount" ).dialog("close");
....
});
I already include the mainAccountGroup.js inside my subAccount.html. NOTE, first question solve in how to close the dialog box after double clicking a row in jqgrid.
Another question is, how to pass the rowid that was click from that jqgrid in the iFrame, to the text box of the first dialog box? Passing values from a .html in a iframe to a dialog box in the main html.