daya007
11-15-2010, 07:08 PM
Hi
Am new to javascript. I have a requirement where user clicks on a image which should direct to iframe. Please follow 2 scripts and please advice how to open iframe link instead of link in window.open
Image code:
<img src = "../samples/images/Edit3.png" alt = "Edit Status" height = 13 width = 13 onclick = "window.open('../cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder%5b%40name%3d%27NARM%27%5d%2fpackage%5b%40name%3d%27TM1_NARM_RISK_DASHB OARD_CREDIT_FINANCE%27%5d%2ffolder%5b%40name%3d%27Credit%20Finance%20Overlay%20Reports%27%5d%2frepor t%5b%40name%3d%27%23%2060%2b%20Rate%27%5d&ui.name=%23%2060%2b%20Rate&run.outputFormat=&run.prompt=true','KPIDetail','width=600,height=350,scrollbars=yes,left=300,top=300')">
Iframe code:
<iframe
src="http://tm1lab.us.hsbc/TM1Web/TM1WebMain.aspx?AdminHost=tm1lab.us.hsbc&TM1Server=narm_risk_dashboard&action=OpenObject&type=Websheet&value=Applications/CF_Commentary/H60Rate" width="100%" height = "100%" scrolling=no >
</iframe>
Am new to javascript. I have a requirement where user clicks on a image which should direct to iframe. Please follow 2 scripts and please advice how to open iframe link instead of link in window.open
Image code:
<img src = "../samples/images/Edit3.png" alt = "Edit Status" height = 13 width = 13 onclick = "window.open('../cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder%5b%40name%3d%27NARM%27%5d%2fpackage%5b%40name%3d%27TM1_NARM_RISK_DASHB OARD_CREDIT_FINANCE%27%5d%2ffolder%5b%40name%3d%27Credit%20Finance%20Overlay%20Reports%27%5d%2frepor t%5b%40name%3d%27%23%2060%2b%20Rate%27%5d&ui.name=%23%2060%2b%20Rate&run.outputFormat=&run.prompt=true','KPIDetail','width=600,height=350,scrollbars=yes,left=300,top=300')">
Iframe code:
<iframe
src="http://tm1lab.us.hsbc/TM1Web/TM1WebMain.aspx?AdminHost=tm1lab.us.hsbc&TM1Server=narm_risk_dashboard&action=OpenObject&type=Websheet&value=Applications/CF_Commentary/H60Rate" width="100%" height = "100%" scrolling=no >
</iframe>