I have a simple RP a PRIM_PANL containing a FilePicker. The file picker has a logo and text.
In a WEBEVENT fulction I have
<div id="LANSAFrame" style="width:50px;height:50px;">
<script type="text/javascript">
var myPart = null;
LANSA.init({sys:"dc-pgmlib",part:"V40",lang:{ def:"ENG",code: { "ENG":"en-AU" } },splash:{ limg:"spin",txt:"Loading..." } } );
LANSA.showPart( "GEN0006", "LANSAFrame", function( newPart ) {
myPart = newPart;
LANSA.setProperty( myPart, "EntityType", "<RDML MERGE="WEBETC_CT">" );
LANSA.setProperty( myPart, "EntityId", "<RDML MERGE="WEBEID_CT">" );
LANSA.setProperty( myPart, "UserId", "<RDML MERGE="WEBUSR_CT">" );
LANSA.setProperty( myPart, "UploadCAPTION", "Select a project" );
LANSA.invokeMethod( myPart, "CheckAuthority" );
});
</script>
This is executing and the #SYS_WEB.Console.Log entries in the RP show that the code is executing but there is nothing on the screen. The PRIM_PANL and FilePicker are both set to visible but they're not.
Any ideas?
Embed a Reusable Part in a 3rd Party Web Page
Re: Embed a Reusable Part in a 3rd Party Web Page
There's an issue with the DIV definition above. I've replaced it with
<div id="VLUPLOADER" style="top:0px;left:0px;width:250px;height:80px;">Div goes here</div>
The issue now is that I can see the phrase 'Div goes here' where I expect them but the upload control with icon flash briefly elsewhere in the page. I'm sure its related to the div style but the document example uses an absolute position which is no good for a webevent component.
<div id="VLUPLOADER" style="top:0px;left:0px;width:250px;height:80px;">Div goes here</div>
The issue now is that I can see the phrase 'Div goes here' where I expect them but the upload control with icon flash briefly elsewhere in the page. I'm sure its related to the div style but the document example uses an absolute position which is no good for a webevent component.
Re: Embed a Reusable Part in a 3rd Party Web Page
OK I now have
<div id="VLUPLOADER" style="position:relative;top:0px;left:0px;width:200px;height:45px;"></div>
and this puts the control right where I want it. The issue is now is that when the page renders it seems to jump down to ensure that the newly rendered control is in focus which is a bit jarring.
Any ideas?
<div id="VLUPLOADER" style="position:relative;top:0px;left:0px;width:200px;height:45px;"></div>
and this puts the control right where I want it. The issue is now is that when the page renders it seems to jump down to ensure that the newly rendered control is in focus which is a bit jarring.
Any ideas?