Jump to content

TUnimHTMLFrame vs TUnimURLFrame


jptec

Recommended Posts

Hi,

 

Want to confirm the following case:

<html>
<body style="background: url('/img/mobile-menu/bg.png'); background-repeat:no-repeat; background-size: cover;">
				<center>
				<a href="#" onclick="javascript:ajaxRequest(MainmForm.form,'STATISTIC' , [parameter='1' ])" >bbbb</a>
				<a href="#" onclick="javascript:ajaxRequest(MainmForm.form,'RANKING' , [parameter='2' ])">cccc</a>
				<a href="#" onclick="javascript:ajaxRequest(MainmForm.form,'COMMENT' , [parameter='3' ])" >dddd</a>
				<a href="#" onclick="javascript:ajaxRequest(MainmForm.form,'TUTORIAL' , [parameter='4' ])" >eeee</a>
				</center>
        </body>
</html>

In TUnimHTMLFrame: it CANNOT show the background image but can capture onclick event in UnimFormAjaxEvent.

 

In TUnimURLFrame: it can show the background image but CANNOT capture onclick event in UnimFormAjaxEvent.

 
The above statement , is it correct?
 
 
Actually I need show a background image in htmlframe, can I achieve it?
 
what is difference bwtween TUnimHTMLFrame and TUnimURLFrame?
 
As I check only TUnimURLFrame come with URL property , can go to URL? Any others?
 
Thanks you 
Joe

 

 

Link to comment
Share on other sites

Try:

On servermodule->customcss-> add :

.trans_panel
{
 background-color:transparent !important;
}
 
 
on your unihtmlframe ->clientevents->extevents add
 
function boxready(sender, width, height, eOpts)
{
    sender.addBodyCls('trans_panel');
}

 

 

Or define you background image on the css

Link to comment
Share on other sites

Thank your hints. I searched previous way to do it:

  with (UnimHTMLFrame1 as IUniJSInterface) do
  begin
    JSCall('element.setStyle', ['background-image', 'url("/img/mobile-menu/bg.png")']);
    JSCall('element.setStyle', ['background-repeat', 'no-repeat']);
    JSCall('element.setStyle', ['background-size', 'cover']);
  end;

If have better solution , Please advise but above already set the background.

 

Thanks

Link to comment
Share on other sites

×
×
  • Create New...