on 06-15-2007 4:48 PM
Ok last question. I promise.
I have an iframe that in my irpt that I would like to pass a param from the main page into the iframe.
Can I use the below javascript:iframe as a src= instead of href= and instead of ('Cored Wire') can I use document.Line.getBrowserObject().getSelectedDatalinkValue();
I need to be able to stick the ibrowser value into this function so the iFram updates with the correct information.
href="javascript:iFrame('Cored Wire');"
function SelectLine(X)
{
var LineID = document.Line.getBrowserObject().getSelectedDatalinkValue();
var strUrl = "FR_Input_Production_History.irpt?Line=" + X;
document.ifrReport.window.location.href = strUrl;
}
href="javascript:iFrame('Cored Wire');"
So, if I understand you correctly, you have a drop down iBrowser on the main page. When a user selects a Line from the iBrowser, it fires the SelectLine(X) JS function and you want the iframe on the page to load the FR_Input_Production_History.irpt page with the correct Line as a URL param?
So if your iframe is defined something like this:
<iframe id="ifrReport" src=""></iframe>
Then your JS code "document.ifrReport.window...." could be replaced with:
document.getElementById("ifrReport").src = strUrl;
I hope this isn't your last question! I like SDN points and T-shirts...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you should send us some t-shirts for all of our questions.
Technically, I do not need the X in my function since it is not in my source anymore.
Here is my solution.
function SelectLine()
{
var LineID = document.Line.getBrowserObject().getSelectedDatalinkValue();
var df = document.frmMain;
document.WorkOrder.getQueryObject().setParam(1, LineID);
df.tLine.value = LineID;
document.WorkOrder.updateBrowser(true);
var strUrl = "FR_Input_Production_History.irpt?Line=" + LineID;
document.getElementById("ifrReport").src = strUrl;
}
<iframe align="center" name="ifrReport" src="" height='510'width='750' id="ifrReport"></iframe>
Now my question is since I have an iFrame that allows me to view data while maintain my current page, how can I select a record (row) in the iReport extract cell number 2, bring it in as a var in the main page and then push it into an iChart in the iframe.
So in a sense, I will open an iGrid in the iFrame, select a record grabbing cell 2, and push cell 2 into param 2 of an iChart in the iFrame.
Are the iGrid and the iChart on the same .irpt page - which happens to be the iframe?
If so, put a selectionEvent on the iGrid, get the cell2 of the selected row by using document.iGrid.getGridObject().getSelectedCellValue(column) or document.iGrid.getGridObject().getSelectedCellValueByName(name) and pass that into the iChart as document.iChart.getQueryObject().setParam(2, document.iGrid.getGridObject().getSelectedCellValue(column));
OK, if you want to use the an applet on the main page FROM the iframe page, use something like:
parent.document.<appletName>.getGridObject().getCellValue(1,1)
If you want to reference an applet in the iframe FROM the main page, use something like:
window.<iframeName>.document.<appletName>.getGridObject().getCellValue(1,1)
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.