cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Issue BLS Image Saver action's Saved Image in Applet

mashfaq
Contributor
0 Kudos

Dear All,

         I have generated .PNG image via BLS transaction with Image saver action. First I save image as configuration given below:

db://NRC_2012/WEB/images/fan.png and it is updated in WEB. In applet I give following code:

<IMG src="/XMII/CM/NRC_2012/images/fan.png"><p>. System showing me picture but it is not updated or old one getting from cache.

Second Scenario:

Second  I save image as configuration given below:

D:\asdf\fan.png and it is D Drive specified folder. In applet I give following code:

<IMG src="d:\asdf\fan.png"><p>. System showing me picture but it is too small 28 * 30 pixels

Kindly help me in this regard.

Thanking you in anticipation

Muhammad Ashfaq

.

Accepted Solutions (1)

Accepted Solutions (1)

former_member204240
Active Participant
0 Kudos

Muhammad,

As you said you will get image from cache.

So you need to reload page to get updated one.

Use location.reload(true); in your initial function which is called on body onload.

If still dont give updated just keep a variable(say cnt=1)with value 1 in calling page and pass to child page as session variable and check

count=App.getPropertyValue('cnt');

    if(count==1)

    {

    count=0;

    App.setPropertyValue('cnt',count);

    location.reload(true);

    }

 

This works even if you going back n forth from one page to other.

It helps.

For size give that in img tag

<img src="../folder/ImagesFolder/Image.png" width="250" height="250">

Warm Regards,

Padma

mashfaq
Contributor
0 Kudos

Dear Padma,

       I make changes for img tag width 250 and 250 as written. But now picture is not showing and same no URL

former_member204240
Active Participant
0 Kudos

Well, is your first problem is solved for getting updated image?

Can you paste your code here.

What image are you generating from BLS? Are you getting proper image in web when you execute your Trx?

mashfaq
Contributor
0 Kudos

Dear Rao,

                      Thanks for your kind response.

I make some changes in configuration. At image saver configuration I have given new path

web://NRC_2012/WEB/images/fan.gif.

Now is it working fine to generate picture.

and Also I have schedule job at every minute of this transaction.

Now problem is when run IRPT file in test mode in MII workbench, its giving old value picture. but when I refresh page, its giving current value of picture which was last updated by transaction.

But in explorer navigation screen, It is behaving same as in workbench showing old picture. Here I can't refresh page, But when i refresh IRPT page in workbench then new picture shows in IE 9

Below given is IRPT coding.

<br />

<html><br />

<head><br />

<title>Fan Speed Display</title><br />

<link rel="stylesheet" type="text/css" href="lighthammer.css"><br />

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><br />

<meta http-equiv="Expires" content="0"><br />

<meta http-equiv="Cache-Control" content="no-cache"><br />

<meta http-equiv="Pragma" content="no-cache"><br />

<APPLET NAME="TransFanSpeed" WIDTH="1" HEIGHT="1" CODE="iCommand" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT><br />

<PARAM NAME="QueryTemplate" VALUE="NRC_2012/TAGMeter/xdemo"><br />

</APPLET><br />

<script language="javascript"><br />

var Time;<br />

function doit(){<br />

executeQry();<br />

imagename = "fan.gif";<br />

tmp = new Date(); <br />

tmp = "?"+tmp.getTime() <br />

document.images["refresh"].src = imagename+tmp;<br />

Time = setTimeout("doit()", 1000);<br />

}<br />

<br />

function clearit(){<br />

clearTimeout(Time);<br />

}<br />

<br />

function executeQry(){<br />

document.TransFanSpeed.executeCommand();<br />

}<br />

</script><br />

</head><br />

<body><br />

<IMG src="/XMII/CM/NRC_2012/images/fan.gif" name="refresh"><p><br />

<button onclick="javascript:doit()">Do it !!!</button><br />

<button onclick="javascript:clearit()">Clear Timeout</button><br />

</body><br />

</html><br />

former_member204240
Active Participant
0 Kudos

use below code in your irpt page

var count=1;//global variable

<body onload=init(); >

function init()

{

if(count==1)

    {

    count=0;

     location.reload(true);

    }

}

This will refreshes the page again.

mashfaq
Contributor
0 Kudos

Dear Rao,

           Thanks, Your kind favor. My problem solved by giving this statement in IRPT file.

<meta http-equiv="Refresh" content="60"> in other your post.

Below given statement does not work. Might be my writing statement place was on wrong place.

var count=1;//global variable

<body onload=init(); >

function init()

{

if(count==1)

    {

    count=0;

     location.reload(true);

    }

}

Bundle of Thanks

Muhammad Ashfaq

former_member204240
Active Participant
0 Kudos

Great. Thanks for sharing solution .

Answers (0)