Grid linked to a form

What I am trying to do is the following and I am very new to javascript.

I have a grid that is populating from xml, when the user clicks on a row I want a separate form in a separate

to populate with specific data so it is easier to read long strings.

Can someone please point me in the right direction?

As far as a code sample this is what I have;

<head>
<title>Test</title>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlxgrid.css">
    <script src="codebase/dhtmlxcommon.js"></script>
    <script src="codebase/dhtmlxgrid.js"></script>
    <script src="codebase/dhtmlxgridcell.js"></script>
	<script src="codebase/ext/dhtmlxgrid_filter.js"></script>
    <script>
    var mygrid;
    function addRow(){
        var newId = (new Date()).valueOf()
        mygrid.addRow(newId,"",mygrid.getRowsNum())
        mygrid.selectRow(mygrid.getRowIndex(newId),false,false,true);
    }
    function removeRow(){
        var selId = mygrid.getSelectedId()
        mygrid.deleteRow(selId);
    }
    function doInitGrid(){
    mygrid = new dhtmlXGridObject('mygrid_container');
    mygrid.setImagePath("codebase/imgs/");
    mygrid.setHeader("Refid,Author,Title,Publication,Volume,Issue,Abstract");
	mygrid.setColumnIds("refid,auth,title,pub,vol,iss,abs");
    mygrid.setInitWidths("50,200,200,200,60,50,300");
    mygrid.setColAlign("left,right,right,right,right,right,right");
    mygrid.setSkin("light");
	mygrid.setColSorting("int,str,str,str,na,na,na");
	mygrid.setColTypes("ed,ed,ed,ed,ed,ed,ed,ed");
	mygrid.attachHeader("&nbsp,#text_filter,#text_filter,#text_filter,&nbsp,#cspan,#cspan");
    mygrid.init();
	mygrid.loadXML("step3.1.xml");
    }
    </script>

</head>
<body onload="doInitGrid();">
<div id="mygrid_container"></div>

</body>
</html>

i suppose you must use onRowSelect Event http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:event_onrowselect and then send id to datastore in url as file.php?id=your_id_value to load datas from this datastore into your container. But i be in wrang because i’m new in dthtmlx too.